From dc0f2b2e14e47a5e92c1c3c2fcc79b5dd9d26923 Mon Sep 17 00:00:00 2001 From: adv Date: Mon, 29 Feb 2016 19:17:40 +0300 Subject: [PATCH] 0000587: External 583: Study should be saveable after a plotting change. --- src/Plot2d/Plot2d_ViewFrame.cxx | 5 +++++ src/Plot2d/Plot2d_ViewFrame.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index c2f602a8c..d4160fbe1 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -1126,6 +1126,8 @@ void Plot2d_ViewFrame::onSettings() // update preferences if ( dlg->isSetAsDefault() ) writePreferences(); + + emit settingsUpdated(); } delete dlg; } @@ -1301,6 +1303,7 @@ void Plot2d_ViewFrame::onChangeBackground() QColor selColor = QColorDialog::getColor ( backgroundColor(), this ); if ( selColor.isValid() ) { setBackgroundColor( selColor ); + emit backgroundColorChanged( selColor ); } } @@ -1352,6 +1355,8 @@ void Plot2d_ViewFrame::showLegend( bool show, bool update ) myPlot->insertLegend( 0 ); if ( update ) myPlot->replot(); + + emit legendStateChanged( myShowLegend ); } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index dd7021107..ff3a61fb1 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -199,6 +199,7 @@ signals: void curveDisplayed( Plot2d_Curve* ); void curveErased( Plot2d_Curve* ); void curvesErased( const curveList& ); + void settingsUpdated(); void curvesUpdated(); void xRangeUpdated( const double&, const double&); void yRangeUpdated( const double&, const double&, const double&, const double&); @@ -206,6 +207,8 @@ signals: const double&, const double&, const double& ); void manualTransformationApplied(); void fitAllApplied(); + void backgroundColorChanged( const QColor& ); + void legendStateChanged( const bool ); protected: Plot2d_Plot2d* myPlot; -- 2.39.2