X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IPropertyPanel.cpp;fp=src%2FModuleBase%2FModuleBase_IPropertyPanel.cpp;h=37230d33de11acb989ba8d4ffec92f417fbf826e;hb=a87ec82289d152ffd66b1cb7133bfb5cbfe92281;hp=bb6d2276a9fe1736a4a2d1773d9498a60d973d4f;hpb=37749d5474472bc9ff475a6fd25698f5a0726a8e;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IPropertyPanel.cpp b/src/ModuleBase/ModuleBase_IPropertyPanel.cpp index bb6d2276a..37230d33d 100644 --- a/src/ModuleBase/ModuleBase_IPropertyPanel.cpp +++ b/src/ModuleBase/ModuleBase_IPropertyPanel.cpp @@ -17,7 +17,24 @@ ModuleBase_IPropertyPanel::ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) { +} + +ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::modelWidget( + const std::string& theAttributeId) const +{ + ModuleBase_ModelWidget* aWidget = 0; + QList aWidgets = modelWidgets(); + ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators(); + for (QList::const_iterator anIt = aWidgets.begin(); + anIt != aWidgets.end() && !aWidget; anIt++) { + ModuleBase_ModelWidget* aCurrentWidget = *anIt; + if (aCurrentWidget->attributeID() == theAttributeId && + aCurrentWidget->canAcceptFocus() && + aValidators->isCase(aCurrentWidget->feature(), aCurrentWidget->attributeID())) + aWidget = aCurrentWidget; + } + return aWidget; } ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget()