X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.cpp;h=6e6bbb85f6f7abdbb656619f58b35bce114f308c;hb=b8924e39fa627f19d6eee9c52973f839b6a647a5;hp=78e485e912d1b5e294d160c57b380e57273aff39;hpb=c2fe0ed8a7a43b7c9f34cd9ec89c7fb079a07045;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.cpp b/src/Config/Config_FeatureReader.cpp index 78e485e91..6e6bbb85f 100644 --- a/src/Config/Config_FeatureReader.cpp +++ b/src/Config/Config_FeatureReader.cpp @@ -17,6 +17,7 @@ #include #include +#include #ifdef _DEBUG #include @@ -72,12 +73,28 @@ bool Config_FeatureReader::processChildren(xmlNodePtr theNode) void Config_FeatureReader::fillFeature(xmlNodePtr theRoot, Config_FeatureMessage& outFtMessage) { outFtMessage.setId(getProperty(theRoot, _ID)); + outFtMessage.setPluginLibrary(myLibraryName); + outFtMessage.setNestedFeatures(getProperty(theRoot, FEATURE_NESTED)); + bool isFtInternal = isInternalFeature(theRoot); + outFtMessage.setInternal(isFtInternal); + if(isFtInternal) { + //Internal feature has no visual representation. + return; + } outFtMessage.setText(getProperty(theRoot, FEATURE_TEXT)); outFtMessage.setTooltip(getProperty(theRoot, FEATURE_TOOLTIP)); outFtMessage.setIcon(getProperty(theRoot, FEATURE_ICON)); outFtMessage.setKeysequence(getProperty(theRoot, FEATURE_KEYSEQUENCE)); outFtMessage.setGroupId(myLastGroup); outFtMessage.setWorkbenchId(myLastWorkbench); - outFtMessage.setPluginLibrary(myLibraryName); - outFtMessage.setNestedFeatures(getProperty(theRoot, FEATURE_NESTED)); +} + +bool Config_FeatureReader::isInternalFeature(xmlNodePtr theRoot) +{ + std::string prop = getProperty(theRoot, FEATURE_INTERNAL); + std::transform(prop.begin(), prop.end(), prop.begin(), ::tolower); + if(prop.empty() || prop == "false" || prop == "0") { + return false; + } + return true; }