diff --git a/Source/GUI/yminmaxselector.cpp b/Source/GUI/yminmaxselector.cpp index a65fb6c96..262de64ff 100644 --- a/Source/GUI/yminmaxselector.cpp +++ b/Source/GUI/yminmaxselector.cpp @@ -193,3 +193,17 @@ void YMinMaxSelector::on_customMinMax_radioButton_clicked() updateMinMaxStyling(); } + +void YMinMaxSelector::on_reset_pushButton_clicked() +{ + QSettings settings; + settings.beginGroup("yminmax"); + settings.remove(QString::number(m_plot->group())); + settings.endGroup(); + + m_plot->setYAxisCustomMinMax(0, 0); + m_plot->loadYAxisMinMaxMode(); + m_plot->replot(); + hide(); +} + diff --git a/Source/GUI/yminmaxselector.h b/Source/GUI/yminmaxselector.h index 8f79e5f70..9f14e5d77 100644 --- a/Source/GUI/yminmaxselector.h +++ b/Source/GUI/yminmaxselector.h @@ -33,6 +33,8 @@ private Q_SLOTS: void on_minMaxSystemProvided_radioButton_clicked(); void on_customMinMax_radioButton_clicked(); + void on_reset_pushButton_clicked(); + private: void updateApplyButton(); void updateMinMaxStyling(); diff --git a/Source/GUI/yminmaxselector.ui b/Source/GUI/yminmaxselector.ui index ab399218d..51922a506 100644 --- a/Source/GUI/yminmaxselector.ui +++ b/Source/GUI/yminmaxselector.ui @@ -6,7 +6,7 @@ 0 0 - 550 + 579 192 @@ -17,7 +17,27 @@ true - + + + + Apply + + + + + + + Qt::Horizontal + + + + 132 + 20 + + + + + Set the y-axis range @@ -177,25 +197,12 @@ - + - Apply + Reset - - - - Qt::Horizontal - - - - 132 - 20 - - - -