Gui: Remove references to the Addon Manager if no Std_AddonMgr (#23167)

* Gui: Remove references to the Addon Manager if no Std_AddonMgr

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Gui: Switch to disabling controls rather than hiding

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Chris Hennes
2025-09-22 11:20:07 -05:00
committed by GitHub
parent 707ee60d64
commit a23bd23159
5 changed files with 21 additions and 5 deletions

View File

@@ -718,8 +718,10 @@ MenuItem* StdWorkbench::setupMenuBar() const
auto tool = new MenuItem( menuBar );
tool->setCommand("&Tools");
#ifdef BUILD_ADDONMGR
*tool << "Std_AddonMgr"
<< "Separator";
if (Application::Instance->commandManager().getCommandByName("Std_AddonMgr")) {
*tool << "Std_AddonMgr"
<< "Separator";
}
#endif
*tool << "Std_Measure"
<< "Std_ClarifySelection"