]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix highlighting problem during interaction
authorapl <apl@opencascade.com>
Wed, 12 Oct 2016 16:00:32 +0000 (19:00 +0300)
committerapl <apl@opencascade.com>
Wed, 12 Oct 2016 16:00:32 +0000 (19:00 +0300)
src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx [changed mode: 0755->0644]
src/MeasureGUI/MeasureGUI_AnnotationInteractor.h [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 9e1c0e3..5047434
@@ -232,6 +232,11 @@ bool MeasureGUI_AnnotationInteractor::eventFilter( QObject* theObject, QEvent* t
         mySelection.Append( anAISContext->SelectedOwner() );
       }
 
+      if ( anAISContext->IsHilighted( myActiveIO ) )
+      {
+        anAISContext->Unhilight( myActiveIO, Standard_False );
+      }
+
       anAISContext->ClearSelected( Standard_False );
       anAISContext->AddOrRemoveSelected( aDetected );
 
@@ -253,6 +258,12 @@ bool MeasureGUI_AnnotationInteractor::eventFilter( QObject* theObject, QEvent* t
       if ( !myActiveIO.IsNull() )
       {
         const Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
+
+        if ( anAISContext->IsHilighted( myActiveIO ) )
+        {
+          anAISContext->Unhilight( myActiveIO, Standard_False );
+        }
+
         const QPoint aDelta = aMouseEv->pos() - myStartPoint;
         myActiveIO->Drag( aDelta.x(), (-aDelta.y()), aView3d );
         anAISContext->Update( myActiveIO, Standard_False );