]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid crash if sensitivity is set to 0
authorvsv <vsv@opencascade.com>
Wed, 15 Apr 2020 10:32:46 +0000 (13:32 +0300)
committervsv <vsv@opencascade.com>
Wed, 15 Apr 2020 10:32:46 +0000 (13:32 +0300)
src/XGUI/XGUI_SelectionActivate.cpp

index 10b1d84e5711f80688e74293a18063176e00669a..8ce0dbbcdb839cc2bb3ad0141a7c80b5523521dd 100644 (file)
@@ -359,6 +359,8 @@ void XGUI_SelectionActivate::activateAIS(const Handle(AIS_InteractiveObject)& th
                (theMode == getSelectionMode(TopAbs_WIRE)))
         aPrecision = theIO->Width() + ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer",
            "edge-selection-sensitivity", 2);
+      if (aPrecision <= 0)
+        aPrecision = 2;
       aContext->SetSelectionSensitivity(theIO, theMode, aPrecision);
     }