- if (myFetchWidgetCfg) {
- xmlBufferPtr buffer = xmlBufferCreate();
- int size = xmlNodeDump(buffer, theNode->doc, theNode, 0, 1);
- myWidgetCfg = std::string((char*) buffer->content);
- } else {
- Event_Loop* aEvLoop = Event_Loop::loop();
- Config_FeatureMessage aMessage(aMenuItemEvent, this);
- fillFeature(theNode, aMessage);
- aEvLoop->send(aMessage);
+ storeAttribute(theNode, _ID);
+ std::shared_ptr<Config_FeatureMessage> aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
+ fillFeature(theNode, aMessage);
+ myFeatures.push_back(getProperty(theNode, _ID));
+ //If a feature has xml definition for it's widget:
+ aMessage->setUseInput(hasChild(theNode));
+ Events_Loop::loop()->send(aMessage);
+ //The m_last* variables always defined before fillFeature() call. XML is a tree.
+ } else if (isNode(theNode, NODE_WORKBENCH, NODE_GROUP, NULL)) {
+ storeAttribute(theNode, _ID);
+ storeAttribute(theNode, WORKBENCH_DOC);
+ } else if (myIsProcessWidgets && isWidgetNode(theNode)) {
+ std::shared_ptr<Config_AttributeMessage> aMessage(new Config_AttributeMessage(aMenuItemEvent, this));
+ aMessage->setFeatureId(restoreAttribute(NODE_FEATURE, _ID));
+ std::string anAttributeID = getProperty(theNode, _ID);
+ if (!anAttributeID.empty()) {
+ aMessage->setAttributeId(anAttributeID);
+ aMessage->setObligatory(getBooleanAttribute(theNode, ATTR_OBLIGATORY, true));
+ aMessage->setConcealment(getBooleanAttribute(theNode, ATTR_CONCEALMENT, false));
+ Events_Loop::loop()->send(aMessage);