mySceneGap = 20;
myFitAllGap = 40;
+ myIsTraceBoundingRectEnabled = true;
// background
setBackgroundBrush( QBrush( Qt::white ) );
myFitAllGap = theFitAllGap;
}
+//================================================================
+// Function : setTraceBoundingRectEnabled
+// Purpose :
+//================================================================
+void GraphicsView_ViewPort::setTraceBoundingRectEnabled( bool theState )
+{
+ myIsTraceBoundingRectEnabled = theState;
+}
+
//================================================================
// Function : setViewNameEnabled
// Purpose :
//================================================================
void GraphicsView_ViewPort::onBoundingRectChanged()
{
- QRectF aRect = objectsBoundingRect();
- myScene->setSceneRect( aRect.adjusted( -mySceneGap, -mySceneGap, mySceneGap, mySceneGap ) );
+ if( myIsTraceBoundingRectEnabled )
+ {
+ QRectF aRect = objectsBoundingRect();
+ myScene->setSceneRect( aRect.adjusted( -mySceneGap, -mySceneGap, mySceneGap, mySceneGap ) );
+ }
}
//================================================================
// scene
void setSceneGap( double theSceneGap );
void setFitAllGap( double theFitAllGap );
+ void setTraceBoundingRectEnabled( bool theState );
// view name
void setViewNamePosition( NamePosition thePosition,
GraphicsView_Scene* myScene;
double mySceneGap;
double myFitAllGap;
+ bool myIsTraceBoundingRectEnabled;
// view name
NameLabel* myNameLabel;