From: Soeren Apel Date: Mon, 19 Jun 2017 19:31:23 +0000 (+0200) Subject: Rename "always zoom-to-fit" to "zoom-to-fit during acquisition" X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e91fb166608133382baa1a90cc022bfa47d649de;p=pulseview.git Rename "always zoom-to-fit" to "zoom-to-fit during acquisition" --- diff --git a/pv/dialogs/settings.cpp b/pv/dialogs/settings.cpp index d3ed1f4e..ef916f1a 100644 --- a/pv/dialogs/settings.cpp +++ b/pv/dialogs/settings.cpp @@ -149,9 +149,9 @@ QWidget *Settings::get_view_settings_form(QWidget *parent) const SLOT(on_view_colouredBG_changed(int))); trace_view_layout->addRow(tr("Use coloured trace &background"), cb); - cb = create_checkbox(GlobalSettings::Key_View_AlwaysZoomToFit, - SLOT(on_view_alwaysZoomToFit_changed(int))); - trace_view_layout->addRow(tr("Constantly perform &zoom-to-fit during capture"), cb); + cb = create_checkbox(GlobalSettings::Key_View_ZoomToFitDuringAcq, + SLOT(on_view_zoomToFitDuringAcq_changed(int))); + trace_view_layout->addRow(tr("Constantly perform &zoom-to-fit during acquisition"), cb); cb = create_checkbox(GlobalSettings::Key_View_ZoomToFitAfterAcq, SLOT(on_view_zoomToFitAfterAcq_changed(int))); @@ -380,10 +380,10 @@ void Settings::on_page_changed(QListWidgetItem *current, QListWidgetItem *previo pages->setCurrentIndex(page_list->row(current)); } -void Settings::on_view_alwaysZoomToFit_changed(int state) +void Settings::on_view_zoomToFitDuringAcq_changed(int state) { GlobalSettings settings; - settings.setValue(GlobalSettings::Key_View_AlwaysZoomToFit, state ? true : false); + settings.setValue(GlobalSettings::Key_View_ZoomToFitDuringAcq, state ? true : false); } void Settings::on_view_zoomToFitAfterAcq_changed(int state) diff --git a/pv/dialogs/settings.hpp b/pv/dialogs/settings.hpp index d981c8bd..6477757f 100644 --- a/pv/dialogs/settings.hpp +++ b/pv/dialogs/settings.hpp @@ -50,7 +50,7 @@ public: private Q_SLOTS: void on_page_changed(QListWidgetItem *current, QListWidgetItem *previous); - void on_view_alwaysZoomToFit_changed(int state); + void on_view_zoomToFitDuringAcq_changed(int state); void on_view_zoomToFitAfterAcq_changed(int state); void on_view_colouredBG_changed(int state); void on_view_stickyScrolling_changed(int state); diff --git a/pv/globalsettings.cpp b/pv/globalsettings.cpp index 7fd1249c..915eaebc 100644 --- a/pv/globalsettings.cpp +++ b/pv/globalsettings.cpp @@ -25,7 +25,7 @@ using std::multimap; namespace pv { -const QString GlobalSettings::Key_View_AlwaysZoomToFit = "View_AlwaysZoomToFit"; +const QString GlobalSettings::Key_View_ZoomToFitDuringAcq = "View_ZoomToFitDuringAcq"; const QString GlobalSettings::Key_View_ZoomToFitAfterAcq = "View_ZoomToFitAfterAcq"; const QString GlobalSettings::Key_View_ColouredBG = "View_ColouredBG"; const QString GlobalSettings::Key_View_StickyScrolling = "View_StickyScrolling"; diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index b2b3626e..eb964fa2 100644 --- a/pv/globalsettings.hpp +++ b/pv/globalsettings.hpp @@ -38,7 +38,7 @@ class GlobalSettings : public QSettings Q_OBJECT public: - static const QString Key_View_AlwaysZoomToFit; + static const QString Key_View_ZoomToFitDuringAcq; static const QString Key_View_ZoomToFitAfterAcq; static const QString Key_View_ColouredBG; static const QString Key_View_StickyScrolling; diff --git a/pv/views/trace/view.cpp b/pv/views/trace/view.cpp index 972b379d..0b5eef74 100644 --- a/pv/views/trace/view.cpp +++ b/pv/views/trace/view.cpp @@ -1316,7 +1316,7 @@ void View::capture_state_updated(int state) // Activate "always zoom to fit" if the setting is enabled and we're // the main view of this session (other trace views may be used for // zooming and we don't want to mess them up) - bool state = settings.value(GlobalSettings::Key_View_AlwaysZoomToFit).toBool(); + bool state = settings.value(GlobalSettings::Key_View_ZoomToFitDuringAcq).toBool(); if (is_main_view_ && state) { always_zoom_to_fit_ = true; always_zoom_to_fit_changed(always_zoom_to_fit_);