fixed status label after instance remove
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0aaea9bf5d
commit
19316e22b4
@ -560,6 +560,7 @@ void MainWindow::updateLaunchButton()
|
|||||||
launchMenu->clear();
|
launchMenu->clear();
|
||||||
else
|
else
|
||||||
launchMenu = new QMenu(this);
|
launchMenu = new QMenu(this);
|
||||||
|
if (m_selectedInstance)
|
||||||
m_selectedInstance->populateLaunchMenu(launchMenu);
|
m_selectedInstance->populateLaunchMenu(launchMenu);
|
||||||
ui->actionLaunchInstance->setMenu(launchMenu);
|
ui->actionLaunchInstance->setMenu(launchMenu);
|
||||||
}
|
}
|
||||||
@ -1351,11 +1352,12 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
|||||||
|
|
||||||
if (APPLICATION->instances()->trashInstance(id)) {
|
if (APPLICATION->instances()->trashInstance(id)) {
|
||||||
ui->actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
|
ui->actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
APPLICATION->instances()->deleteInstance(id);
|
APPLICATION->instances()->deleteInstance(id);
|
||||||
}
|
}
|
||||||
|
APPLICATION->settings()->set("SelectedInstance", QString());
|
||||||
|
selectionBad();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionExportInstanceZip_triggered()
|
void MainWindow::on_actionExportInstanceZip_triggered()
|
||||||
{
|
{
|
||||||
@ -1652,10 +1654,6 @@ void MainWindow::instanceChanged(const QModelIndex& current, [[maybe_unused]] co
|
|||||||
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
|
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
|
||||||
connect(m_selectedInstance.get(), &BaseInstance::profilerChanged, this, &MainWindow::refreshCurrentInstance);
|
connect(m_selectedInstance.get(), &BaseInstance::profilerChanged, this, &MainWindow::refreshCurrentInstance);
|
||||||
} else {
|
} else {
|
||||||
ui->instanceToolBar->setEnabled(false);
|
|
||||||
setInstanceActionsEnabled(false);
|
|
||||||
ui->actionLaunchInstance->setEnabled(false);
|
|
||||||
ui->actionKillInstance->setEnabled(false);
|
|
||||||
APPLICATION->settings()->set("SelectedInstance", QString());
|
APPLICATION->settings()->set("SelectedInstance", QString());
|
||||||
selectionBad();
|
selectionBad();
|
||||||
return;
|
return;
|
||||||
@ -1680,6 +1678,7 @@ void MainWindow::selectionBad()
|
|||||||
{
|
{
|
||||||
// start by reseting everything...
|
// start by reseting everything...
|
||||||
m_selectedInstance = nullptr;
|
m_selectedInstance = nullptr;
|
||||||
|
m_statusLeft->setText(tr("No instance selected"));
|
||||||
|
|
||||||
statusBar()->clearMessage();
|
statusBar()->clearMessage();
|
||||||
ui->instanceToolBar->setEnabled(false);
|
ui->instanceToolBar->setEnabled(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user