From: nds Date: Fri, 23 May 2014 04:52:13 +0000 (+0400) Subject: Increasing the sensitivity of selection to 10 pixels. X-Git-Tag: V_0.2~22^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=60a126ededb03b62ad91bd67e089e2ac8613746c;p=modules%2Fshaper.git Increasing the sensitivity of selection to 10 pixels. --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 4073b30b4..3eb66b044 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -20,6 +20,8 @@ #include +const int MOUSE_SENSITIVITY_IN_PIXEL = 10; ///< defines the local context mouse selection sensitivity + XGUI_Displayer::XGUI_Displayer(XGUI_Workshop* theWorkshop) { myWorkshop = theWorkshop; @@ -119,6 +121,9 @@ void XGUI_Displayer::Redisplay(boost::shared_ptr theFeature, if (!aContext->HasOpenedContext()) { aContext->ClearCurrents(false); aContext->OpenLocalContext(false/*use displayed objects*/, true/*allow shape decomposition*/); + // set mouse sensitivity + aContext->SetSensitivityMode(StdSelect_SM_WINDOW); + aContext->SetPixelTolerance(MOUSE_SENSITIVITY_IN_PIXEL); } // display or redisplay presentation Handle(AIS_Shape) anAIS;