fix(instance edit): don't allow editing if no selected instance or instance doesn't support editing
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
67d473aab7
commit
a54bbae622
@ -1279,7 +1279,17 @@ void MainWindow::globalSettingsClosed()
|
||||
|
||||
void MainWindow::on_actionEditInstance_triggered()
|
||||
{
|
||||
APPLICATION->showInstanceWindow(m_selectedInstance);
|
||||
|
||||
if (!m_selectedInstance)
|
||||
return;
|
||||
|
||||
if (m_selectedInstance->canEdit()) {
|
||||
APPLICATION->showInstanceWindow(m_selectedInstance);
|
||||
} 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();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionManageAccounts_triggered()
|
||||
|
Loading…
Reference in New Issue
Block a user