From: vsv Date: Thu, 5 Sep 2019 11:54:41 +0000 (+0300) Subject: Issue #2929: Unhighlight on 'H' key press when in preferences highlighting is switched on X-Git-Tag: VEDF2019Lot4~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cfdaa54a4b348023010af23b7b88c09ae55ffae4;p=modules%2Fshaper.git Issue #2929: Unhighlight on 'H' key press when in preferences highlighting is switched on --- diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index 7e33366f9..0523975ff 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -299,18 +299,34 @@ void XGUI_ViewerProxy::onMouseMove(AppElements_ViewWindow* theWnd, QMouseEvent* if (myIs2dMode) { bool aHighlight2d = ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "highlighting-2d", true); - if (aHighlight2d || myShowHighlight) - updateHighlight(); - else - eraseHighlight(); + if (aHighlight2d) { + if (myShowHighlight) + eraseHighlight(); + else + updateHighlight(); + } + else { + if (myShowHighlight) + updateHighlight(); + else + eraseHighlight(); + } } else { bool aHighlight3d = ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "highlighting-3d", false); - if (aHighlight3d || myShowHighlight) - updateHighlight(); - else - eraseHighlight(); + if (aHighlight3d) { + if (myShowHighlight) + eraseHighlight(); + else + updateHighlight(); + } + else { + if (myShowHighlight) + updateHighlight(); + else + eraseHighlight(); + } } emit mouseMove(theWnd, theEvent); } @@ -528,18 +544,34 @@ void XGUI_ViewerProxy::onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* if (myIs2dMode) { bool aHighlight2d = ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "highlighting-2d", true); - if (aHighlight2d || myShowHighlight) - updateHighlight(); - else - eraseHighlight(); + if (aHighlight2d) { + if (myShowHighlight) + eraseHighlight(); + else + updateHighlight(); + } + else { + if (myShowHighlight) + updateHighlight(); + else + eraseHighlight(); + } } else { bool aHighlight3d = ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "highlighting-3d", false); - if (aHighlight3d || myShowHighlight) - updateHighlight(); - else - eraseHighlight(); + if (aHighlight3d) { + if (myShowHighlight) + eraseHighlight(); + else + updateHighlight(); + } + else { + if (myShowHighlight) + updateHighlight(); + else + eraseHighlight(); + } } emit mouseMove(theWnd, theEvent); }