]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Working with preselection after edit operation
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 24 Dec 2014 15:11:11 +0000 (18:11 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 24 Dec 2014 15:11:11 +0000 (18:11 +0300)
src/PartSet/PartSet_SketcherMgr.cpp
src/XGUI/XGUI_Displayer.cpp

index 33a9e91ae49fb672b6d39a06755b8eca08c65ae1..7b6aea62214bd2d853eaec70c00286e4e5b38d96 100644 (file)
@@ -216,11 +216,11 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse
   if (!aViewer->isMultiSelectionEnabled()) {
     aViewer->enableMultiselection(true);
   }
-  aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
-  if (theEvent->modifiers() & Qt::ShiftModifier)
-    aViewer->AISContext()->ShiftSelect();
-  else
-    aViewer->AISContext()->Select();
+  //aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
+  //if (theEvent->modifiers() & Qt::ShiftModifier)
+  //  aViewer->AISContext()->ShiftSelect();
+  //else
+  //  aViewer->AISContext()->Select();
 }
 
 void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
index 09bc3494f32fff71799e3cb536fcdd108b87348a..3b0cbc3e601d47d0116a22974f13d4812092f160 100644 (file)
@@ -196,7 +196,13 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer)
     Handle(AIS_InteractiveContext) aContext = AISContext();
     if (aContext.IsNull())
       return;
-    aContext->Redisplay(aAISIO, isUpdateViewer);
+    bool aToSelect = aContext->IsSelected(aAISIO);
+    aContext->Redisplay(aAISIO, false);
+    // Restore selection state after redisplay
+    if (aToSelect) 
+      aContext->SetSelected(aAISIO);
+    if (isUpdateViewer)
+      updateViewer();
   }
 }