X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_ActiveControlMgr.cpp;h=b79971cf2b7bd08836b4d903939f9094567db700;hb=c6745a6b1ad00c0285fab5aeac2cb0d57afef5cc;hp=7176e061e45c8bbb407b245b285853a173b85e01;hpb=9b6f6cc1aa25604283a872d0252b6f36c20402bc;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ActiveControlMgr.cpp b/src/XGUI/XGUI_ActiveControlMgr.cpp index 7176e061e..b79971cf2 100644 --- a/src/XGUI/XGUI_ActiveControlMgr.cpp +++ b/src/XGUI/XGUI_ActiveControlMgr.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "XGUI_ActiveControlMgr.h" @@ -94,7 +93,13 @@ void XGUI_ActiveControlMgr::onSelectorActivated() void XGUI_ActiveControlMgr::onSelectorDeactivated() { XGUI_ActiveControlSelector* aSelector = qobject_cast(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 @@ -105,9 +110,8 @@ void XGUI_ActiveControlMgr::onSelectorDeactivated() activateSelector(NULL); XGUI_ActiveControlSelector* aSelectorToBeActivated = 0; - for (int i = 0, aCount = mySelectors.count(); i < aCount; i++) - { - if (!mySelectors[i]->needToBeActiated()) + for (int i = 0, aCount = mySelectors.count(); i < aCount; i++) { + if (!mySelectors[i]->needToBeActivated()) continue; aSelectorToBeActivated = mySelectors[i]; break;