From: vsv Date: Thu, 16 Jun 2016 16:09:49 +0000 (+0300) Subject: Fix for constraints selection X-Git-Tag: V_2.4.0~94 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=430718764290da9456f5afc1c904d949930dcfae;p=modules%2Fshaper.git Fix for constraints selection --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 091cd446c..83e738a05 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -903,14 +903,15 @@ void XGUI_Displayer::activateAIS(const Handle(AIS_InteractiveObject)& theIO, aContext->Activate(theIO, theMode, false); // the fix from VPA for more suitable selection of sketcher lines - double aPrecision = theIO->Width() + 2; - if (theMode == getSelectionMode(TopAbs_VERTEX)) - aPrecision = ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "point-selection-sensitivity", 20); - else if ((theMode == getSelectionMode(TopAbs_EDGE)) || (theMode == getSelectionMode(TopAbs_WIRE))) - aPrecision = theIO->Width() + - ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "edge-selection-sensitivity", 2); - aContext->SetSelectionSensitivity(theIO, theMode, aPrecision); - + if (theIO->Width() > 1) { + double aPrecision = theIO->Width() + 2; + if (theMode == getSelectionMode(TopAbs_VERTEX)) + aPrecision = ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "point-selection-sensitivity", 20); + else if ((theMode == getSelectionMode(TopAbs_EDGE)) || (theMode == getSelectionMode(TopAbs_WIRE))) + aPrecision = theIO->Width() + + ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "edge-selection-sensitivity", 2); + aContext->SetSelectionSensitivity(theIO, theMode, aPrecision); + } ModuleBase_Tools::selectionInfo(aContext, "XGUI_Displayer::activateAIS -- Activate"); #ifdef DEBUG_ACTIVATE_AIS