From 6e7f8d9d9cbcc9b4e8f320ffbc90210c6479d7a8 Mon Sep 17 00:00:00 2001 From: Leon Richardt Date: Fri, 16 Oct 2020 09:06:54 +0200 Subject: [PATCH] Fix: ColorButtons in settings don't respect search (#2073) Prior to this commit, adding a ColorButton to a SettingsLayout via `SettingsLayout::addColorButton` lead to the button not respecting search queries. This is because they are not added to the layout in a Group. This commit fixes the behavior, causing color buttons to behave like every other settings widget. --- src/widgets/settingspages/GeneralPage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 01701b97b..cfc97806b 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -189,6 +189,9 @@ ColorButton *SettingsLayout::addColorButton( }); }); + this->groups_.back().widgets.push_back({label, {text}}); + this->groups_.back().widgets.push_back({colorButton, {text}}); + return colorButton; }