mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Added warning on mods update while running
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -150,9 +150,9 @@ bool ModFolderPage::onSelectionChanged(const QModelIndex& current, [[maybe_unuse
|
||||
void ModFolderPage::removeItems(const QItemSelection& selection)
|
||||
{
|
||||
if (m_instance != nullptr && m_instance->isRunning()) {
|
||||
auto response = CustomMessageBox::selectable(this, "Confirm Delete",
|
||||
"If you remove mods while the game is running it may crash your game.\n"
|
||||
"Are you sure you want to do this?",
|
||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Delete"),
|
||||
tr("If you remove mods while the game is running it may crash your game.\n"
|
||||
"Are you sure you want to do this?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
->exec();
|
||||
|
||||
@ -218,6 +218,17 @@ void ModFolderPage::updateMods()
|
||||
QMessageBox::critical(this, tr("Error"), tr("Mod updates are unavailable when metadata is disabled!"));
|
||||
return;
|
||||
}
|
||||
if (m_instance != nullptr && m_instance->isRunning()) {
|
||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Update"),
|
||||
tr("If you update mods while the game is running may cause mod duplication.\n"
|
||||
"The old files may not be deleted as they are in use.\n"
|
||||
"Are you sure you want to do this?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
->exec();
|
||||
|
||||
if (response != QMessageBox::Yes)
|
||||
return;
|
||||
}
|
||||
auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
|
||||
|
||||
auto mods_list = m_model->selectedMods(selection);
|
||||
|
Reference in New Issue
Block a user