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 ), myKeepCurrentRange( false ),
myTitleAutoUpdate( true ), myXTitleAutoUpdate( true ), myYTitleAutoUpdate( true ),
myTitleChangedByUser( false ), myXTitleChangedByUser( false ), myYTitleChangedByUser( false ),
myY2TitleChangedByUser( false ), myIsTimeColorization( false ), myTimePosition( -1 ), myInactiveColor( Qt::gray )
return mySecondY;
}
+/*!
+ Set flag which indicate keep current range or not
+*/
+void Plot2d_ViewFrame::setKeepCurrentRange( const bool& theKeepCurrentRange )
+{
+ myKeepCurrentRange = theKeepCurrentRange;
+}
+
+/*!
+ Get flag which indicate keep current range or not
+*/
+bool Plot2d_ViewFrame::getKeepCurrentRange()
+{
+ return myKeepCurrentRange;
+}
+
/*!
Erase presentation
*/
aCurve = *it;
displayCurve( aCurve, false );
}
- fitAll();
+
+ if ( !myKeepCurrentRange )
+ fitAll();
+
//myPlot->setUpdatesEnabled( true );
// update legend
if ( update )
void setSecondY( const bool& theSecondY );
bool getSecondY();
+ bool getKeepCurrentRange();
+ void setKeepCurrentRange( const bool& theKeepCurrentRange );
+
bool isTitleChangedByUser( const ObjectType type );
void forgetLocalUserChanges( const ObjectType type );
int myXMode, myYMode;
double myXDistance, myYDistance, myYDistance2;
bool mySecondY;
+ bool myKeepCurrentRange;
bool myTitleAutoUpdate, myXTitleAutoUpdate, myYTitleAutoUpdate;
bool myTitleChangedByUser, myXTitleChangedByUser, myYTitleChangedByUser,