Skip to content

Commit

Permalink
Sketcher: Fix accessibility of some group commands
Browse files Browse the repository at this point in the history
The affected commands are:
* Sketcher_CompLine
* Sketcher_CompCreateArc
* Sketcher_CompCreateConic
* Sketcher_CompCreateFillets
* Sketcher_CompCurveEdition
* Sketcher_CompSlot
* Sketcher_CompHorVer
* Sketcher_CompToggleConstraints
  • Loading branch information
wwmayer committed May 21, 2024
1 parent ea2ce93 commit dc99a1e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/Mod/Sketcher/Gui/CommandConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,14 @@ class CmdSketcherCompToggleConstraints : public Gui::GroupCommand
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 =======================================================
Expand Down Expand Up @@ -2790,7 +2797,15 @@ class CmdSketcherCompHorizontalVertical : public Gui::GroupCommand
addCommand("Sketcher_ConstrainVertical");
}

const char* className() const override { return "CmdSketcherCompHorizontalVertical"; }
const char* className() const override
{
return "CmdSketcherCompHorizontalVertical";
}

bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

// ============================================================================
Expand Down
28 changes: 28 additions & 0 deletions src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ class CmdSketcherCompLine: public Gui::GroupCommand
{
return "CmdSketcherCompLine";
}

bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

// Line ================================================================
Expand Down Expand Up @@ -574,6 +579,10 @@ class CmdSketcherCompCreateArc: public Gui::GroupCommand
{
return "CmdSketcherCompCreateArc";
}
bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

// ======================================================================================
Expand Down Expand Up @@ -822,6 +831,10 @@ class CmdSketcherCompCreateConic: public Gui::GroupCommand
{
return "CmdSketcherCompCreateConic";
}
bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

// ======================================================================================
Expand Down Expand Up @@ -1268,6 +1281,11 @@ class CmdSketcherCompCreateFillets: public Gui::GroupCommand
{
return "CmdSketcherCompCreateFillets";
}

bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};


Expand Down Expand Up @@ -1389,6 +1407,11 @@ class CmdSketcherCompCurveEdition: public Gui::GroupCommand
{
return "CmdSketcherCompCurveEdition";
}

bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

// ======================================================================================
Expand Down Expand Up @@ -1500,6 +1523,11 @@ class CmdSketcherCompSlot: public Gui::GroupCommand
{
return "CmdSketcherCompSlot";
}

bool isActive() override
{
return isCommandActive(getActiveGuiDocument());
}
};

/* Create Slot =============================================================*/
Expand Down

0 comments on commit dc99a1e

Please sign in to comment.