summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-02-27 12:31:00 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-27 10:48:35 -0800
commit8c56b2f45e546048941ba004bce5e5bfd0e6e660 (patch)
treedda271fc80ce1d57df9dd31ea7c0644ae8bd62fc /qt-ui/mainwindow.cpp
parent0307f3d5432dfc98cc4be317b0f2ce93e27c336b (diff)
downloadsubsurface-8c56b2f45e546048941ba004bce5e5bfd0e6e660.tar.gz
Store zoomed plot in preferences
This patch makes the 'Zoomed Plot' a preference that can be stored and retrieved, this way if the user sets the plot to be 'zoomed', this information will persist even if they closed or opened subsurface again. Also, added the 'Scale' button on the new profile, but didn't did the glue code yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 70415f077..59ebf2f25 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -364,12 +364,6 @@ void MainWindow::on_actionAutoGroup_triggered()
mark_divelist_changed(true);
}
-void MainWindow::on_actionToggleZoom_triggered()
-{
- zoomed_plot = !zoomed_plot;
- ui.ProfileWidget->refresh();
-}
-
void MainWindow::on_actionYearlyStatistics_triggered()
{
QTreeView *view = new QTreeView();
@@ -1066,4 +1060,10 @@ void MainWindow::on_profSAC_clicked(bool triggered)
TOOLBOX_PREF_PROFILE(show_sac);
}
+void MainWindow::on_profScaled_clicked(bool triggered)
+{
+ prefs.zoomed_plot = triggered;
+ TOOLBOX_PREF_PROFILE(zoomed_plot);
+}
+
#undef TOOLBOX_PREF_PROFILE