mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
additional erase-all flag in CurveCreator_Curve
This commit is contained in:
parent
190ad709e4
commit
412e3db8f2
@ -59,6 +59,7 @@ CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimensi
|
|||||||
mySkipSorting(false),
|
mySkipSorting(false),
|
||||||
myPointAspectColor (Quantity_NOC_ROYALBLUE4),
|
myPointAspectColor (Quantity_NOC_ROYALBLUE4),
|
||||||
myCurveColor (Quantity_NOC_RED),
|
myCurveColor (Quantity_NOC_RED),
|
||||||
|
myEraseAll(true),
|
||||||
myLineWidth(1)
|
myLineWidth(1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -363,8 +364,12 @@ bool CurveCreator_Curve::redo()
|
|||||||
bool CurveCreator_Curve::clearInternal()
|
bool CurveCreator_Curve::clearInternal()
|
||||||
{
|
{
|
||||||
// erase curve from the viewer
|
// erase curve from the viewer
|
||||||
if( myDisplayer ) {
|
if( myDisplayer )
|
||||||
myDisplayer->eraseAll( true );
|
{
|
||||||
|
if (myEraseAll)
|
||||||
|
myDisplayer->eraseAll( true );
|
||||||
|
else
|
||||||
|
myDisplayer->erase(myAISShape, false);
|
||||||
myAISShape = NULL;
|
myAISShape = NULL;
|
||||||
}
|
}
|
||||||
// Delete all allocated data.
|
// Delete all allocated data.
|
||||||
@ -400,6 +405,23 @@ bool CurveCreator_Curve::clear()
|
|||||||
return res;
|
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.
|
//! For internal use only! Undo/Redo are not used here.
|
||||||
bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
|
bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
|
||||||
{
|
{
|
||||||
|
@ -140,6 +140,14 @@ public:
|
|||||||
//! Clear the polyline (remove all sections)
|
//! Clear the polyline (remove all sections)
|
||||||
virtual bool clear();
|
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.
|
//! For internal use only! Undo/Redo are not used here.
|
||||||
virtual bool joinInternal( const std::list<int>& theSections );
|
virtual bool joinInternal( const std::list<int>& theSections );
|
||||||
|
|
||||||
@ -338,6 +346,7 @@ private:
|
|||||||
int myUndoDepth;
|
int myUndoDepth;
|
||||||
int myOpLevel;
|
int myOpLevel;
|
||||||
AIS_Shape* myAISShape; //!< AIS shape
|
AIS_Shape* myAISShape; //!< AIS shape
|
||||||
|
bool myEraseAll;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user