From 58479e4b00d399e3025558104e50c75ef609dda0 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 29 Jul 2020 22:14:43 -0400 Subject: filter for games replaced the button box with a regular widget with vertical layout it was doing weird things to buttons with focus when removing and adding buttons on the fly because of filtering --- src/createinstancedialogpages.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/createinstancedialogpages.h') diff --git a/src/createinstancedialogpages.h b/src/createinstancedialogpages.h index b8366234..f2f4216d 100644 --- a/src/createinstancedialogpages.h +++ b/src/createinstancedialogpages.h @@ -1,10 +1,12 @@ #ifndef MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED #define MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED +#include "createinstancedialog.h" +#include + #include #include #include -#include "createinstancedialog.h" namespace MOBase { class IPluginGame; } @@ -107,16 +109,19 @@ private: std::vector> m_games; Game* m_selection; - + MOBase::FilterWidget m_filter; std::vector sortedGamePlugins() const; Game* findGame(MOBase::IPluginGame* game); void createGames(); void updateButton(Game* g); void selectButton(Game* g); + void clearButtons(); + void addButton(QAbstractButton* b); QCommandLinkButton* createCustomButton(); void createGameButton(Game* g); void fillList(); + void onFilter(); Game* checkInstallation(const QString& path, Game* g); MOBase::IPluginGame* findAnotherGame(const QString& path); bool confirmUnknown(const QString& path, MOBase::IPluginGame* game); -- cgit v1.3.1