]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for selection
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 6 Apr 2015 09:30:38 +0000 (12:30 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 6 Apr 2015 09:30:38 +0000 (12:30 +0300)
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp

index a577d40eead9ee00c95bb5f9f3385045733167a0..20fc780a705d564a603b0e8dde375b97e2975123 100644 (file)
@@ -14,6 +14,7 @@
 #include <Graphic3d_BndBox4f.hxx>
 
 #include <SelectMgr_Selection.hxx>
+#include <SelectMgr_SelectionManager.hxx>
 #include <Select3D_SensitivePoint.hxx>
 #include <TopLoc_Location.hxx>
 #include <AIS_InteractiveContext.hxx>
@@ -419,8 +420,10 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   theWorkspace->EnableTexture (aTextureBack);
   aCtx->BindProgram (NULL);
 
-  // Update selection position
-  GetContext()->RecomputeSelectionOnly(this);
+  // Update selection position only if there is no selected object
+  // because it can corrupt selection of other objects
+  if ((GetContext()->NbCurrents() == 0) && (GetContext()->NbSelected() == 0))
+    GetContext()->RecomputeSelectionOnly(this);
 }