diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 7aaa985c5..b4c54ec1e 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -266,6 +266,16 @@ void ViewProvider::setDisplayMaskMode( const char* type ) setModeSwitch(); } +SoNode* ViewProvider::getDisplayMaskMode(const char* type) const +{ + std::map::const_iterator it = _sDisplayMaskModes.find( type ); + if (it != _sDisplayMaskModes.end()) { + return pcModeSwitch->getChild(it->second); + } + + return 0; +} + std::vector ViewProvider::getDisplayMaskModes() const { std::vector types; diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index f410ffaea..694d72b27 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -308,6 +308,8 @@ protected: void addDisplayMaskMode( SoNode *node, const char* type ); /// Activates the display mask mode \a type void setDisplayMaskMode( const char* type ); + /// Get the node to the display mask mode \a type + SoNode* getDisplayMaskMode(const char* type) const; /// Returns a list of added display mask modes std::vector getDisplayMaskModes() const; void setDefaultMode(int);