outFeatureMessage->setKeysequence(getProperty(theNode, FEATURE_KEYSEQUENCE));
outFeatureMessage->setGroupId(restoreAttribute(NODE_GROUP, _ID));
outFeatureMessage->setWorkbenchId(restoreAttribute(NODE_WORKBENCH, _ID));
- outFeatureMessage->setDocumentKind(restoreAttribute(NODE_WORKBENCH, WORKBENCH_DOC));
+ // Get document kind of a feature, if empty set workbench's kind (might be empty too)
+ std::string aDocKind = getProperty(theNode, WORKBENCH_DOC);
+ if(aDocKind.empty()) {
+ aDocKind = restoreAttribute(NODE_WORKBENCH, WORKBENCH_DOC);
+ }
+ outFeatureMessage->setDocumentKind(aDocKind);
}
void Config_FeatureReader::storeAttribute(xmlNodePtr theNode,
PartSetPlugin_Remove.cpp
)
+SET(XML_RESOURCES
+ plugin-PartSet.xml
+)
+
ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS)
-ADD_LIBRARY(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ADD_LIBRARY(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(PartSetPlugin ${PROJECT_LIBRARIES} ModelAPI)
INCLUDE_DIRECTORIES(
../GeomAPI
)
-SET(XML_RESOURCES
- plugin-PartSet.xml
-)
-
INSTALL(TARGETS PartSetPlugin DESTINATION plugins)
INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
<workbench id="Part">
<group id="Operations">
<feature id="Part" title="New part" tooltip="Create a new part" icon=":pictures/part_ico.png"/>
- <feature id="Duplicate" title="Duplicate" tooltip="Duplicate selected part" icon=":icons/duplicate.png"/>
- <feature id="Remove" title="Remove part" tooltip="Remove active part" icon=":icons/remove.png"/>
+ <feature id="Duplicate" title="Duplicate"
+ tooltip="Duplicate selected part"
+ icon=":icons/duplicate.png"
+ document="Part"/>
+ <feature id="Remove"
+ title="Remove part"
+ tooltip="Remove active part"
+ icon=":icons/remove.png"
+ document="Part"/>
</group>
</workbench>
</plugin>