Merge pull request #2705 from Janrupf/feature/fix_external_deletion_interaction
GH-2515 Save instance ID before display dialog
This commit is contained in:
commit
75ddbc8851
@ -234,7 +234,7 @@ void InstanceList::deleteInstance(const InstanceId& id)
|
|||||||
auto inst = getInstanceById(id);
|
auto inst = getInstanceById(id);
|
||||||
if(!inst)
|
if(!inst)
|
||||||
{
|
{
|
||||||
qDebug() << "Cannot delete instance" << id << " No such instance is present.";
|
qDebug() << "Cannot delete instance" << id << ". No such instance is present (deleted externally?).";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1667,6 +1667,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
auto id = m_selectedInstance->id();
|
||||||
auto response = CustomMessageBox::selectable(
|
auto response = CustomMessageBox::selectable(
|
||||||
this,
|
this,
|
||||||
tr("CAREFUL!"),
|
tr("CAREFUL!"),
|
||||||
@ -1677,7 +1678,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
|||||||
)->exec();
|
)->exec();
|
||||||
if (response == QMessageBox::Yes)
|
if (response == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
MMC->instances()->deleteInstance(m_selectedInstance->id());
|
MMC->instances()->deleteInstance(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user