void CurveCreator_Curve::redisplayCurve()
{
if( myDisplayer ) {
- myDisplayer->erase();
- myDisplayer->display( constructWire() );
+ myDisplayer->erase( false );
+ myDisplayer->display( constructWire(), true );
}
}
{
// erase curve from the viewer
if( myDisplayer )
- myDisplayer->erase();
+ myDisplayer->erase( true );
// Delete all allocated data.
int i = 0;
const int aNbSections = getNbSections();
CurveCreator_Displayer::~CurveCreator_Displayer(void)
{
- erase();
+ erase( true );
for( int i = 0 ; i < myObjects.size() ; i++ ){
myObjects[i].Nullify();
}
myObjects.clear();
}
-void CurveCreator_Displayer::display( AISObjectsList theCurveObjects )
+void CurveCreator_Displayer::display( AISObjectsList theCurveObjects, bool isUpdate )
{
myObjects = theCurveObjects;
if(myObjects.empty())
for( int i = 0 ; i < myObjects.size() ; i++ ){
myContext->Display(myObjects[i], Standard_False);
}
- myContext->UpdateCurrentViewer();
+ if( isUpdate )
+ myContext->UpdateCurrentViewer();
}
-void CurveCreator_Displayer::erase()
+void CurveCreator_Displayer::erase( bool isUpdate )
{
if(myObjects.empty())
return;
for( int i = 0 ; i < myObjects.size() ; i++ ){
myContext->Erase(myObjects[i], Standard_False);
}
- myContext->UpdateCurrentViewer();
+ if( isUpdate )
+ myContext->UpdateCurrentViewer();
}
Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
CurveCreator_Displayer(Handle_AIS_InteractiveContext theContext );
~CurveCreator_Displayer(void);
- void display( AISObjectsList theCurveObjects );
- void erase();
+ void display( AISObjectsList theCurveObjects, bool isUpdate );
+ void erase( bool isUpdate );
void highlight( const AISObjectsList& theObjects, bool isHL );
protected:
{
// erase curve from the viewer
if( myDisplayer )
- myDisplayer->erase();
+ myDisplayer->erase( true );
// Delete all allocated data.
mySections[ 0 ]->myPoints.clear();
{
CurveCreator_Displayer* aDisplayer = new CurveCreator_Displayer( aCtx );
myCurve->setDisplayer( aDisplayer );
- aDisplayer->display( myCurve->constructWire() );
+ aDisplayer->display( myCurve->constructWire(), true );
}
}
}
Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
if( !aCtx.IsNull() )
{
- aDisplayer->erase();
+ aDisplayer->erase( true );
}
}
}
{
CurveCreator_Displayer* aDisplayer = new CurveCreator_Displayer( aCtx );
myProfile->setDisplayer( aDisplayer );
- aDisplayer->display( myProfile->constructWire() );
+ aDisplayer->display( myProfile->constructWire(), true );
}
}
}
Handle(AIS_InteractiveContext) aCtx = aPanel->getAISContext();
if( !aCtx.IsNull() )
{
- aDisplayer->erase();
+ aDisplayer->erase( true );
}
}
}