Salome HOME
Issue #2998: Add help description for automatic creation of constraints
[modules/shaper.git] / src / XGUI / XGUI_ActiveControlMgr.cpp
index 775985d76c44bef1dbbea65d8de1b7d18778feb0..b79971cf2b7bd08836b4d903939f9094567db700 100644 (file)
@@ -93,7 +93,13 @@ void XGUI_ActiveControlMgr::onSelectorActivated()
 void XGUI_ActiveControlMgr::onSelectorDeactivated()
 {
   XGUI_ActiveControlSelector* aSelector = qobject_cast<XGUI_ActiveControlSelector*>(sender());
-  if (!aSelector || aSelector != myActiveSelector || !myActiveSelector)
+  deactivateSelector(aSelector);
+}
+
+//********************************************************************
+void XGUI_ActiveControlMgr::deactivateSelector(XGUI_ActiveControlSelector* theSelector)
+{
+  if (!theSelector || theSelector != myActiveSelector || !myActiveSelector)
     return;
 
   if (myIsBlocked) // we've come here from the same method
@@ -104,8 +110,7 @@ void XGUI_ActiveControlMgr::onSelectorDeactivated()
   activateSelector(NULL);
 
   XGUI_ActiveControlSelector* aSelectorToBeActivated = 0;
-  for (int i = 0, aCount = mySelectors.count(); i < aCount; i++)
-  {
+  for (int i = 0, aCount = mySelectors.count(); i < aCount; i++) {
     if (!mySelectors[i]->needToBeActivated())
       continue;
     aSelectorToBeActivated = mySelectors[i];