mySkipSorting(false),
myPointAspectColor (Quantity_NOC_ROYALBLUE4),
myCurveColor (Quantity_NOC_RED),
+ myEraseAll(true),
myLineWidth(1)
{
}
bool CurveCreator_Curve::clearInternal()
{
// erase curve from the viewer
- if( myDisplayer ) {
- myDisplayer->eraseAll( true );
+ if( myDisplayer )
+ {
+ if (myEraseAll)
+ myDisplayer->eraseAll( true );
+ else
+ myDisplayer->erase(myAISShape, false);
myAISShape = NULL;
}
// Delete all allocated data.
return res;
}
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+void CurveCreator_Curve::SetEraseAllState(bool toEraseAll)
+{
+ myEraseAll = toEraseAll;
+}
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+bool CurveCreator_Curve::GetEraseAllState() const
+{
+ return myEraseAll;
+}
+
//! For internal use only! Undo/Redo are not used here.
bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
{
//! Clear the polyline (remove all sections)
virtual bool clear();
+ //! set erase-all state
+ //! if true => erase all objects from viever, else remove only the current curve
+ void SetEraseAllState(bool toEraseAll);
+
+ //! get erase-all state
+ //! if true => erase all objects from viever, else remove only the current curve
+ bool GetEraseAllState() const;
+
//! For internal use only! Undo/Redo are not used here.
virtual bool joinInternal( const std::list<int>& theSections );
int myUndoDepth;
int myOpLevel;
AIS_Shape* myAISShape; //!< AIS shape
+ bool myEraseAll;
};
#endif