From 8a063f5e0171930fd67817c679d5c2e3d954a8fe Mon Sep 17 00:00:00 2001 From: mtn Date: Tue, 10 Nov 2009 11:02:51 +0000 Subject: [PATCH] Changes according bug 30165 --- src/Plot2d/Plot2d_ViewFrame.cxx | 6 ++++-- src/Plot2d/Plot2d_ViewFrame.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index a0fe2ff9e..450df87e8 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -161,7 +161,7 @@ Plot2d_ViewFrame::Plot2d_ViewFrame( QWidget* parent, const QString& title ) myXGridMinorEnabled( false ), myYGridMinorEnabled( false ), myY2GridMinorEnabled( false ), myXGridMaxMajor( 8 ), myYGridMaxMajor( 8 ), myY2GridMaxMajor( 8 ), myXGridMaxMinor( 5 ), myYGridMaxMinor( 5 ), myY2GridMaxMinor( 5 ), - myXMode( 0 ), myYMode( 0 ), mySecondY( false ) + myXMode( 0 ), myYMode( 0 ), mySecondY( false ), isDefTitle(true) { setObjectName( title ); /* Plot 2d View */ @@ -363,6 +363,7 @@ bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e ) void Plot2d_ViewFrame::setTitle( const QString& title ) { setTitle( myTitleEnabled, title, MainTitle, true ); + isDefTitle = false; } /*! @@ -1002,6 +1003,7 @@ void Plot2d_ViewFrame::onSettings() setTitle( dlg->isY2TitleEnabled(), dlg->getY2Title(), Y2Title, false ); // main title + if( dlg->isMainTitleEnabled() && myTitle != dlg->getMainTitle()) isDefTitle = false; setTitle( dlg->isMainTitleEnabled(), dlg->getMainTitle(), MainTitle, true ); // curve type if ( myCurveType != dlg->getCurveType() ) { @@ -1950,7 +1952,7 @@ void Plot2d_ViewFrame::updateTitles() setTitle( myYTitleEnabled, yTitle + yUnits, YTitle, true ); if ( mySecondY ) setTitle( myY2TitleEnabled, y2Title + y2Units, Y2Title, true ); - setTitle( true, aTables.join("; "), MainTitle, true ); + if(isDefTitle) setTitle( true, aTables.join("; "), MainTitle, true ); } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index c76e7a570..d634446ce 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -218,6 +218,7 @@ protected: double myXDistance, myYDistance, myYDistance2; bool mySecondY; ObjectDict myObjects; + bool isDefTitle; }; class Plot2d_Plot2d : public QwtPlot -- 2.39.2