]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make sketch lines more selectable (selection area is increased)
authormpv <mpv@opencascade.com>
Fri, 4 Sep 2015 14:48:47 +0000 (17:48 +0300)
committermpv <mpv@opencascade.com>
Fri, 4 Sep 2015 14:48:47 +0000 (17:48 +0300)
src/XGUI/XGUI_Displayer.cpp

index c79aeafacef1eda8f17476e08c88047584c69a7c..887e7046857bab1efd4c3aa6cc13a6daaacef15b 100644 (file)
@@ -210,7 +210,14 @@ void XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS,
 
     emit objectDisplayed(theObject, theAIS);
     activate(anAISIO, myActiveSelectionModes, theUpdateViewer);
- } 
+    // the fix from VPA for more suitable selection of sketcher lines
+    if(anAISIO->Width() > 1) {
+      for(int aModeIdx = 0; aModeIdx < myActiveSelectionModes.length(); ++aModeIdx) {
+        aContext->SetSelectionSensitivity(anAISIO,
+          myActiveSelectionModes.value(aModeIdx), anAISIO->Width() + 2);
+      }
+    }
+  } 
   if (theUpdateViewer)
     updateViewer();
 }