QCheckBox *always_zoom_to_fit_cb = new QCheckBox();
always_zoom_to_fit_cb->setChecked(settings.value(GlobalSettings::Key_View_AlwaysZoomToFit).toBool());
connect(always_zoom_to_fit_cb, SIGNAL(stateChanged(int)), this, SLOT(on_view_alwaysZoomToFit_changed(int)));
- trace_view_layout->addRow(tr("&Always zoom-to-fit during capture"), always_zoom_to_fit_cb);
+ trace_view_layout->addRow(tr("Constantly perform &zoom-to-fit during capture"), always_zoom_to_fit_cb);
+
+ QCheckBox *sticky_scrolling_cb = new QCheckBox();
+ sticky_scrolling_cb->setChecked(settings.value(GlobalSettings::Key_View_StickyScrolling).toBool());
+ connect(sticky_scrolling_cb, SIGNAL(stateChanged(int)), this, SLOT(on_view_stickyScrolling_changed(int)));
+ trace_view_layout->addRow(tr("Always keep &newest samples at the right edge during capture"), sticky_scrolling_cb);
return form;
}
settings.setValue(GlobalSettings::Key_View_ColouredBG, state ? true : false);
}
+void Settings::on_view_stickyScrolling_changed(int state)
+{
+ GlobalSettings settings;
+ settings.setValue(GlobalSettings::Key_View_StickyScrolling, state ? true : false);
+}
+
+
} // namespace dialogs
} // namespace pv