diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index c29345db24..5d35fe1a04 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -1318,7 +1318,14 @@ public: addCommand("Sketcher_ToggleActiveConstraint"); } - const char* className() const override { return "CmdSketcherCompToggleConstraints"; } + const char* className() const override + { + return "CmdSketcherCompToggleConstraints"; + } + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // Dimension tool ======================================================= @@ -2790,7 +2797,15 @@ public: addCommand("Sketcher_ConstrainVertical"); } - const char* className() const override { return "CmdSketcherCompHorizontalVertical"; } + const char* className() const override + { + return "CmdSketcherCompHorizontalVertical"; + } + + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // ============================================================================ diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index 7e110bfa05..64de98b848 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -152,6 +152,11 @@ public: { return "CmdSketcherCompLine"; } + + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // Line ================================================================ @@ -574,6 +579,10 @@ public: { return "CmdSketcherCompCreateArc"; } + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // ====================================================================================== @@ -822,6 +831,10 @@ public: { return "CmdSketcherCompCreateConic"; } + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // ====================================================================================== @@ -1268,6 +1281,11 @@ public: { return "CmdSketcherCompCreateFillets"; } + + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; @@ -1389,6 +1407,11 @@ public: { return "CmdSketcherCompCurveEdition"; } + + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; // ====================================================================================== @@ -1500,6 +1523,11 @@ public: { return "CmdSketcherCompSlot"; } + + bool isActive() override + { + return isCommandActive(getActiveGuiDocument()); + } }; /* Create Slot =============================================================*/