mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 12:26:58 +03:00
Add setting to edit instance on double click
Assisted-by: OpenAI Codex Signed-off-by: Sameer <sameer.adnan@proton.me>
This commit is contained in:
parent
bf8d1ca1f8
commit
675a80b7db
4 changed files with 26 additions and 0 deletions
|
|
@ -1617,6 +1617,17 @@ void MainWindow::on_actionLaunchInstance_triggered()
|
|||
|
||||
void MainWindow::activateInstance(BaseInstance* instance)
|
||||
{
|
||||
if (APPLICATION->settings()->get("OpenEditWindowOnInstanceDoubleClick").toBool()) {
|
||||
if (instance->canEdit()) {
|
||||
APPLICATION->showInstanceWindow(instance);
|
||||
} else {
|
||||
CustomMessageBox::selectable(
|
||||
this, tr("Instance not editable"),
|
||||
tr("This instance is not editable. It may be broken, invalid, or too old. Check logs for details."), QMessageBox::Critical)
|
||||
->show();
|
||||
}
|
||||
return;
|
||||
}
|
||||
APPLICATION->launch(instance);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue