]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.cpp
TraceView: Use sticky scrolling setting directly
[pulseview.git] / pv / mainwindow.cpp
index 9164c6e82ac0e330623ff8105db4a6c92a311d24..4e6ab75d9502b190e85e3823d839261fa36134f5 100644 (file)
@@ -86,8 +86,6 @@ MainWindow::MainWindow(DeviceManager &device_manager,
 
        GlobalSettings::register_change_handler(GlobalSettings::Key_View_ColouredBG,
                bind(&MainWindow::on_settingViewColouredBg_changed, this, _1));
 
        GlobalSettings::register_change_handler(GlobalSettings::Key_View_ColouredBG,
                bind(&MainWindow::on_settingViewColouredBg_changed, this, _1));
-       GlobalSettings::register_change_handler(GlobalSettings::Key_View_StickyScrolling,
-               bind(&MainWindow::on_settingViewStickyScrolling_changed, this, _1));
 
        setup_ui();
        restore_ui_settings();
 
        setup_ui();
        restore_ui_settings();
@@ -204,7 +202,6 @@ shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title,
                views::TraceView::View *tv =
                        qobject_cast<views::TraceView::View*>(v.get());
 
                views::TraceView::View *tv =
                        qobject_cast<views::TraceView::View*>(v.get());
 
-               tv->enable_sticky_scrolling(true);
                tv->enable_coloured_bg(settings.value(GlobalSettings::Key_View_ColouredBG).toBool());
 
                if (!main_bar) {
                tv->enable_coloured_bg(settings.value(GlobalSettings::Key_View_ColouredBG).toBool());
 
                if (!main_bar) {
@@ -750,21 +747,6 @@ void MainWindow::on_settingViewColouredBg_changed(const QVariant new_value)
        }
 }
 
        }
 }
 
-void MainWindow::on_settingViewStickyScrolling_changed(const QVariant new_value)
-{
-       bool state = new_value.toBool();
-
-       for (auto entry : view_docks_) {
-               shared_ptr<views::ViewBase> viewbase = entry.second;
-
-               // Only trace views have this setting
-               views::TraceView::View* view =
-                               qobject_cast<views::TraceView::View*>(viewbase.get());
-               if (view)
-                       view->enable_sticky_scrolling(state);
-       }
-}
-
 void MainWindow::on_close_current_tab()
 {
        int tab = session_selector_.currentIndex();
 void MainWindow::on_close_current_tab()
 {
        int tab = session_selector_.currentIndex();