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 d14743c2a5
commit ea85d3fed0
5 changed files with 21 additions and 5 deletions

View File

@@ -42,7 +42,12 @@ DlgPreferencePackManagementImp::DlgPreferencePackManagementImp(QWidget* parent)
, ui(new Ui_DlgPreferencePackManagement)
{
ui->setupUi(this);
connect(ui->pushButtonOpenAddonManager, &QPushButton::clicked, this, &DlgPreferencePackManagementImp::showAddonManager);
if (Application::Instance->commandManager().getCommandByName("Std_AddonMgr")) {
connect(ui->pushButtonOpenAddonManager, &QPushButton::clicked, this, &DlgPreferencePackManagementImp::showAddonManager);
}
else {
ui->pushButtonOpenAddonManager->setDisabled(true);
}
connect(this, &DlgPreferencePackManagementImp::packVisibilityChanged, this, &DlgPreferencePackManagementImp::updateTree);
updateTree();
}