X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ActionsMgr.cpp;h=8d2eada7c492bd5ae4a04d0a51c8c03182e2d5ce;hb=8ebc9a7d5f87057b61b174e7568e01e44571549d;hp=525d58892d0737a218ab7bc46f2370e1ec9f6bc4;hpb=8ca8dcce41467a32024022e8930716d0d635d82f;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ActionsMgr.cpp b/src/XGUI/XGUI_ActionsMgr.cpp index 525d58892..8d2eada7c 100644 --- a/src/XGUI/XGUI_ActionsMgr.cpp +++ b/src/XGUI/XGUI_ActionsMgr.cpp @@ -156,20 +156,15 @@ void XGUI_ActionsMgr::updateOnViewSelection() ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); foreach(QString aFeatureId, aIdList) { foreach(QString aId, nestedCommands(aFeatureId)) { - std::list aValidators; - std::list > anArguments; - aFactory->validators(aId.toStdString(), aValidators, anArguments); - std::list::iterator aValidator = aValidators.begin(); - std::list >::iterator aValidatorArgs = anArguments.begin(); - for (; aValidator != aValidators.end(); aValidator++, aValidatorArgs++) { - if (!(*aValidator)) - continue; + ModelAPI_ValidatorsFactory::Validators aValidators; + aFactory->validators(aId.toStdString(), aValidators); + ModelAPI_ValidatorsFactory::Validators::iterator aValidatorIt = aValidators.begin(); + for (; aValidatorIt != aValidators.end(); ++aValidatorIt) { const ModuleBase_SelectionValidator* aSelValidator = - dynamic_cast(*aValidator); + dynamic_cast(aFactory->validator(aValidatorIt->first)); if (!aSelValidator) continue; - setActionEnabled(aId, aSelValidator->isValid(aSelection, *aValidatorArgs)); - + setActionEnabled(aId, aSelValidator->isValid(aSelection, aValidatorIt->second)); } } }