]> git.sesse.net Git - nageru/blobdiff - mainwindow.cpp
Only adjust pts with the wheel if the given row is selected. It is just too easy...
[nageru] / mainwindow.cpp
index 198a6313ee3237b908cf3ae8d2481b2f7d7523d2..6e999bad4ba653253c81b54073879d7fc87e06c0 100644 (file)
@@ -551,6 +551,12 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event)
                int row = destination->rowAt(wheel->y());
                if (column == -1 || row == -1) return false;
 
+               // Only adjust pts with the wheel if the given row is selected.
+               if (!destination->hasFocus() ||
+                   row != destination->selectionModel()->currentIndex().row()) {
+                       return false;
+               }
+
                currently_deferring_model_changes = true;
                {
                        current_change_id = (watched == ui->clip_list->viewport()) ? "cliplist:" : "playlist:";
@@ -594,6 +600,7 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event)
                        }
                }
                currently_deferring_model_changes = false;
+               return true;  // Don't scroll.
        } else if (event->type() == QEvent::MouseButtonRelease) {
                scrubbing = false;
        }