From 259e8df5efeb14f8560b252a335011c910e2e648 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 15 Feb 2012 12:54:48 +0000 Subject: [PATCH] Store/restore/dump background color along with the GUI state --- src/Plot2d/Plot2d_ViewFrame.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index ba256d536..bb2f8d73d 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -3316,6 +3316,7 @@ QString Plot2d_ViewFrame::getVisualParameters() retStr+=optCurveString; } } + retStr += QString( "*%1" ).arg( Qtx::colorToString( backgroundColor() ) ); return retStr; } @@ -3401,6 +3402,12 @@ void Plot2d_ViewFrame::setVisualParameters( const QString& parameters ) addAnalyticalCurve(c); updateAnalyticalCurve(c); } + else if( curveLst.size() == 1 ) { + // background color can be set here + QColor c; + if ( Qtx::stringToColor( paramsLst[i], c ) ) + setBackgroundColor( c ); + } } myPlot->replot(); } -- 2.39.2