- const std::set<std::string>& aTypes = theCreator->widgetTypes();
- std::set<std::string>::const_iterator anIt = aTypes.begin(), aLast = aTypes.end();
- for (; anIt != aLast; anIt++) {
+ std::set<std::string>::const_iterator anIt, aLast;
+ /// fill map of panels
+ std::set<std::string> aPanelTypes;
+ theCreator->panelTypes(aPanelTypes);
+ for (anIt = aPanelTypes.begin(), aLast = aPanelTypes.end(); anIt != aLast; anIt++) {
+ std::string aKey = *anIt;
+ if (!myPanelToCreator.contains(aKey))
+ myPanelToCreator[aKey] = theCreator;
+ else {
+ Events_InfoMessage("ModuleBase_WidgetCreatorFactory",
+ "The %1 panel XML definition has been already used by another widget creator")
+ .arg(aKey).send();
+ }
+ }
+
+ /// fill map of widgets
+ std::set<std::string> aTypes;
+ theCreator->widgetTypes(aTypes);
+ for (anIt = aTypes.begin(), aLast = aTypes.end(); anIt != aLast; anIt++) {