//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);
+ storeAttribute(theNode, WORKBENCH_DOC, true);
} else if (myIsProcessWidgets) {
// widgets, like shape_selector or containers, like toolbox
if (isAttributeNode(theNode)) {
return result;
}
-void Config_XMLReader::storeAttribute(xmlNodePtr theNode, const char* theAttribute)
+void Config_XMLReader::storeAttribute(xmlNodePtr theNode, const char* theAttribute, bool doClean)
{
std::string aKey = getNodeName(theNode) + ":" + std::string(theAttribute);
std::string aValue = getProperty(theNode, theAttribute);
- if(!aValue.empty()) {
+ if (doClean || !aValue.empty()) {
myCachedAttributes[aKey] = aValue;
}
}
std::string getNodeName(xmlNodePtr theNode);
/// Stores an attribute in internal map for later use.
/// Key is "Node_Name:Node_Attribute" and value is getProperty(theNodeAttribute)
- void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
+ void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute, bool doClean = false);
/// Restores an attribute from internal map.
std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute);
/// Restores an attribute from internal map.
<!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
<plugin>
- <workbench id="Movement">
- <group id="Basic">
- <feature id="Placement" title="Placement" tooltip="Perform moving of an object to specified position" icon=":icons/placement.png">
- <source path="placement_widget.xml"/>
- </feature>
- <feature id="Movement" title="Movement" tooltip="Perform movement of an objects along the axis to specified distance" icon=":icons/movement.png">
- <source path="movement_widget.xml"/>
- </feature>
- <feature id="Rotation" title="Rotation" tooltip="Perform rotation of an objects around the axis to specified angle" icon=":icons/rotation.png">
- <source path="rotation_widget.xml"/>
- </feature>
- </group>
- </workbench>
<workbench id="Features" document="Part">
<group id="Extrusion">
<feature id="Extrusion" title="Extrusion" tooltip="Create a solid by extrusion of a face" icon=":icons/extrusion.png">
</feature>
</group>
</workbench>
+ <workbench id="Features">
+ <group id="Basic">
+ <feature id="Placement" title="Placement" tooltip="Perform moving of an object to specified position" icon=":icons/placement.png">
+ <source path="placement_widget.xml"/>
+ </feature>
+ <feature id="Movement" title="Movement" tooltip="Perform movement of an objects along the axis to specified distance" icon=":icons/movement.png">
+ <source path="movement_widget.xml"/>
+ </feature>
+ <feature id="Rotation" title="Rotation" tooltip="Perform rotation of an objects around the axis to specified angle" icon=":icons/rotation.png">
+ <source path="rotation_widget.xml"/>
+ </feature>
+ </group>
+ </workbench>
</plugin>