X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_CustomPrs.h;h=a491ec7eccd5871405b9332d62c671ca88a7a636;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=6b31fdabe9a700e2f8fcd6f4a3177837b54834dd;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_CustomPrs.h b/src/PartSet/PartSet_CustomPrs.h index 6b31fdabe..a491ec7ec 100644 --- a/src/PartSet/PartSet_CustomPrs.h +++ b/src/PartSet/PartSet_CustomPrs.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -98,6 +98,16 @@ public: /// it caused erroneus case because the presentation has linkage to the previous context. void clearPrs(); + /// Disable displaying of custom mode + /// \param theMode a mode to disable + void disableCustomMode(ModuleBase_IModule::ModuleBase_CustomizeFlag theMode) { + myDisabledMode = theMode; + erasePresentation(theMode, false); + } + + /// Enables disabled custom mode + void enableCustomModes() { myDisabledMode = -1; } + //! Redefinition of Events_Listener method to listen a moment that the presentation becomes empty virtual void processEvent(const std::shared_ptr& theMessage); @@ -149,6 +159,8 @@ private: QMap myPresentations; /// State whether the presentation is activated/deactivated QMap myIsActive; + + int myDisabledMode; }; #endif