diff options
author | Robb <computerguy440+gh@gmail.com> | 2022-08-09 16:01:21 -0500 |
---|---|---|
committer | Robb <computerguy440+gh@gmail.com> | 2022-08-09 16:01:21 -0500 |
commit | cd30f75173a8062a02413420ecbbc51ce15007e1 (patch) | |
tree | d4d8fc3e8a55e60d088cd2189d22ba3f0d00debe /launcher/ui/pages/instance/WorldListPage.cpp | |
parent | 75f92de8f8517142289dc76d071cfb4fa724598c (diff) | |
download | PrismLauncher-cd30f75173a8062a02413420ecbbc51ce15007e1.tar.gz PrismLauncher-cd30f75173a8062a02413420ecbbc51ce15007e1.tar.bz2 PrismLauncher-cd30f75173a8062a02413420ecbbc51ce15007e1.zip |
fix: Make world safety nag title text match the action being performed instead of always saying 'Copy World'
Signed-off-by: Robb <computerguy440+gh@gmail.com>
Diffstat (limited to 'launcher/ui/pages/instance/WorldListPage.cpp')
-rw-r--r-- | launcher/ui/pages/instance/WorldListPage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/launcher/ui/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp index 647b04a7..a5c692ac 100644 --- a/launcher/ui/pages/instance/WorldListPage.cpp +++ b/launcher/ui/pages/instance/WorldListPage.cpp @@ -211,7 +211,7 @@ void WorldListPage::on_actionDatapacks_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion("Open World Datapacks Folder")) return; auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString(); @@ -269,7 +269,7 @@ void WorldListPage::on_actionMCEdit_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion("Open World in MCEdit")) return; auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString(); @@ -373,11 +373,11 @@ bool WorldListPage::isWorldSafe(QModelIndex) return !m_inst->isRunning(); } -bool WorldListPage::worldSafetyNagQuestion() +bool WorldListPage::worldSafetyNagQuestion(const QString &actionType) { if(!isWorldSafe(getSelectedWorld())) { - auto result = QMessageBox::question(this, tr("Copy World"), tr("Changing a world while Minecraft is running is potentially unsafe.\nDo you wish to proceed?")); + auto result = QMessageBox::question(this, tr("%1").arg(actionType), tr("Changing a world while Minecraft is running is potentially unsafe.\nDo you wish to proceed?")); if(result == QMessageBox::No) { return false; @@ -395,7 +395,7 @@ void WorldListPage::on_actionCopy_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion("Copy World")) return; auto worldVariant = m_worlds->data(index, WorldList::ObjectRole); @@ -417,7 +417,7 @@ void WorldListPage::on_actionRename_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion("Rename World")) return; auto worldVariant = m_worlds->data(index, WorldList::ObjectRole); |