From 27fa8229eecd2fb3b8dead6621c44f30f893f557 Mon Sep 17 00:00:00 2001 From: Paddle Date: Sun, 30 Jul 2023 09:02:29 +0200 Subject: [PATCH] Prevent the pref pack widget from showing themes --- src/Gui/DlgGeneralImp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Gui/DlgGeneralImp.cpp b/src/Gui/DlgGeneralImp.cpp index e1ba708532..daba5c7c19 100644 --- a/src/Gui/DlgGeneralImp.cpp +++ b/src/Gui/DlgGeneralImp.cpp @@ -434,6 +434,17 @@ void DlgGeneralImp::recreatePreferencePackMenu() Application::Instance->prefPackManager()->rescan(); auto packs = Application::Instance->prefPackManager()->preferencePacks(); + // Remove the Themes. + std::vector packsToRemove; + for (const auto& pack : packs) { + if (pack.second.metadata().type() == "Theme") { + packsToRemove.push_back(pack.first); // Store the keys to remove later + } + } + for (const auto& key : packsToRemove) { + packs.erase(key); // Remove the elements from the map + } + ui->PreferencePacks->setRowCount(packs.size()); int row = 0;