From f7c144c3932a18e1cd96e1ad7505e53ea706a47d Mon Sep 17 00:00:00 2001 From: phit <2097483+phit@users.noreply.github.com> Date: Sat, 19 Jun 2021 16:19:39 +0200 Subject: GH-3720 Fix UI inconsistencies with Modplatforms Fixes GH-3118 Fixes GH-3720 Fixes GH-3731 Icons and Ok button state will now switch consistently when moving between tabs. ATLaunchers packlist is now no longer redownloaded each time you open its Tab. All lists are striped now. And all search and filter fields now have a placeholder text. --- application/pages/modplatform/atlauncher/AtlPage.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'application/pages/modplatform/atlauncher/AtlPage.cpp') diff --git a/application/pages/modplatform/atlauncher/AtlPage.cpp b/application/pages/modplatform/atlauncher/AtlPage.cpp index 748f467c..1b61ebd0 100644 --- a/application/pages/modplatform/atlauncher/AtlPage.cpp +++ b/application/pages/modplatform/atlauncher/AtlPage.cpp @@ -45,15 +45,29 @@ bool AtlPage::shouldDisplay() const void AtlPage::openedImpl() { - listModel->request(); + if(!initialized) + { + listModel->request(); + initialized = true; + } + + suggestCurrent(); } void AtlPage::suggestCurrent() { - if(isOpened) { - dialog->setSuggestedPack(selected.name, new ATLauncher::PackInstallTask(this, selected.safeName, selectedVersion)); + if(!isOpened) + { + return; + } + + if (selectedVersion.isEmpty()) + { + dialog->setSuggestedPack(); + return; } + dialog->setSuggestedPack(selected.name, new ATLauncher::PackInstallTask(this, selected.safeName, selectedVersion)); auto editedLogoName = selected.safeName; auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/images/%1.png").arg(selected.safeName.toLower()); listModel->getLogo(selected.safeName, url, [this, editedLogoName](QString logo) -- cgit