From 60a126ededb03b62ad91bd67e089e2ac8613746c Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 23 May 2014 08:52:13 +0400 Subject: [PATCH] Increasing the sensitivity of selection to 10 pixels. --- src/XGUI/XGUI_Displayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.2