aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/ui/pages/instance/ManagedPackPage.cpp10
-rw-r--r--launcher/ui/pages/instance/ManagedPackPage.ui7
2 files changed, 16 insertions, 1 deletions
diff --git a/launcher/ui/pages/instance/ManagedPackPage.cpp b/launcher/ui/pages/instance/ManagedPackPage.cpp
index 8b0f715d..10182b8b 100644
--- a/launcher/ui/pages/instance/ManagedPackPage.cpp
+++ b/launcher/ui/pages/instance/ManagedPackPage.cpp
@@ -61,6 +61,14 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi
ui->setupUi(this);
ui->versionsComboBox->setStyle(new NoBigComboBoxStyle(ui->versionsComboBox->style()));
+
+ ui->reloadButton->setVisible(false);
+ connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){
+ ui->reloadButton->setVisible(false);
+
+ // Pretend we're opening the page again
+ openedImpl();
+ });
}
ManagedPackPage::~ManagedPackPage()
@@ -154,7 +162,7 @@ void ManagedPackPage::setFailState()
ui->updateButton->setText(tr("Cannot update!"));
ui->updateButton->setDisabled(true);
- // TODO: Perhaps start a timer here when m_loaded is false to try and reload.
+ ui->reloadButton->setVisible(true);
}
ModrinthManagedPackPage::ModrinthManagedPackPage(BaseInstance* inst, InstanceWindow* instance_window, QWidget* parent)
diff --git a/launcher/ui/pages/instance/ManagedPackPage.ui b/launcher/ui/pages/instance/ManagedPackPage.ui
index b7c91798..bbe44a94 100644
--- a/launcher/ui/pages/instance/ManagedPackPage.ui
+++ b/launcher/ui/pages/instance/ManagedPackPage.ui
@@ -179,6 +179,13 @@
</item>
</layout>
</item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="reloadButton">
+ <property name="text">
+ <string>Reload page</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<resources/>