]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
refs #736: fix displaying of ghost of polyline section in addition mode.
authormkr <mkr@opencascade.com>
Wed, 25 Nov 2015 15:43:47 +0000 (18:43 +0300)
committermkr <mkr@opencascade.com>
Wed, 25 Nov 2015 15:43:47 +0000 (18:43 +0300)
src/CurveCreator/CurveCreator_Widget.cxx

index 54cf166bbb12bcde2f009e3f75e395ee9bad7d7a..0bbccc6a12c610c234b88e21f13de5e25c214d8c 100644 (file)
@@ -1005,10 +1005,18 @@ void CurveCreator_Widget::onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent
  */
 void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow* theWindow, QMouseEvent* theEvent )
 {
-  if ( getActionMode() != ModificationMode )
+  ActionMode aMode = getActionMode();
+  if ( aMode != ModificationMode )
   {
     // Emit selectionChanged() signal
     getOCCViewer()->performSelectionChanged();
+
+    if ( aMode == AdditionMode )
+    {
+      Handle(AIS_InteractiveContext) aCtx = getAISContext();
+      if ( !aCtx.IsNull() )
+        aCtx->ClearSelected();
+    }
     return;
   } 
   if (theEvent->button() != Qt::LeftButton) return;