diff --git a/src/Gui/CommandLink.cpp b/src/Gui/CommandLink.cpp index 1f9b594eee..fae114e310 100644 --- a/src/Gui/CommandLink.cpp +++ b/src/Gui/CommandLink.cpp @@ -892,7 +892,15 @@ public: addCommand(new StdCmdLinkImportAll()); } - const char* className() const override {return "StdCmdLinkActions";} + const char* className() const override + { + return "StdCmdLinkActions"; + } + + bool isActive() override + { + return hasActiveDocument(); + } }; //=========================================================================== diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index df9bf58ead..1355ef7c2a 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -1648,6 +1648,11 @@ public: { return "StdCmdViewGroup"; } + + bool isActive() override + { + return hasActiveDocument(); + } }; //=========================================================================== diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 345531c578..77ec3e6381 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -2422,6 +2422,11 @@ public: { return "CmdPartDesignCompDatums"; } + + bool isActive() override + { + return hasActiveDocument(); + } }; // Command group for datums ============================================= @@ -2452,6 +2457,11 @@ public: { return "CmdPartDesignCompSketches"; } + + bool isActive() override + { + return hasActiveDocument(); + } }; //===========================================================================