aboutsummaryrefslogtreecommitdiff
path: root/application/pages/modplatform/atlauncher/AtlPage.cpp
diff options
context:
space:
mode:
authorphit <2097483+phit@users.noreply.github.com>2021-06-19 16:19:39 +0200
committerphit <2097483+phit@users.noreply.github.com>2021-06-20 01:03:17 +0200
commitf7c144c3932a18e1cd96e1ad7505e53ea706a47d (patch)
tree41db6a9b877d269b941c07ba738dba5bf92051e6 /application/pages/modplatform/atlauncher/AtlPage.cpp
parent5f8d07c0092b6cc44f81104a3d7f9e7e49d9df5d (diff)
downloadPrismLauncher-f7c144c3932a18e1cd96e1ad7505e53ea706a47d.tar.gz
PrismLauncher-f7c144c3932a18e1cd96e1ad7505e53ea706a47d.tar.bz2
PrismLauncher-f7c144c3932a18e1cd96e1ad7505e53ea706a47d.zip
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.
Diffstat (limited to 'application/pages/modplatform/atlauncher/AtlPage.cpp')
-rw-r--r--application/pages/modplatform/atlauncher/AtlPage.cpp20
1 files changed, 17 insertions, 3 deletions
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)