Sketcher: Fix accessibility of some group commands

The affected commands are:
* Sketcher_CompLine
* Sketcher_CompCreateArc
* Sketcher_CompCreateConic
* Sketcher_CompCreateFillets
* Sketcher_CompCurveEdition
* Sketcher_CompSlot
* Sketcher_CompHorVer
* Sketcher_CompToggleConstraints
This commit is contained in:
wmayer
2024-05-21 15:57:24 +02:00
committed by wwmayer
parent 1d78063df8
commit f89a0cec28
2 changed files with 45 additions and 2 deletions

View File

@@ -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());
}
};
// ============================================================================

View File

@@ -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 =============================================================*/