mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 17:09:56 +00:00
Honor clear selection of media in Train Sidebar
CTRL+Click on a selected media file allows to clear the selection, lets honor this action to have a way to train without video after a media file has been selected. [publish binaries]
This commit is contained in:
@@ -1056,7 +1056,10 @@ TrainSidebar::mediaTreeWidgetSelectionChanged()
|
||||
QModelIndex current = mediaTree->currentIndex();
|
||||
QModelIndex target = vsortModel->mapToSource(current);
|
||||
QString filename = videoModel->data(videoModel->index(target.row(), 0), Qt::DisplayRole).toString();
|
||||
context->notifyMediaSelected(filename);
|
||||
if (filename == context->videoFilename)
|
||||
context->notifyMediaSelected(""); // CTRL+Click to clear selection
|
||||
else
|
||||
context->notifyMediaSelected(filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user