Skip to content
Permalink
Browse files

Merge pull request #2705 from Janrupf/feature/fix_external_deletion_i…

…nteraction

GH-2515 Save instance ID before display dialog
  • Loading branch information...
peterix committed Jun 23, 2019
2 parents 2f1d31c + 1ed84ed commit 75ddbc8851c8227baad4e2f1d120785090d5e992
Showing with 3 additions and 2 deletions.
  1. +1 −1 api/logic/InstanceList.cpp
  2. +2 −1 application/MainWindow.cpp
@@ -234,7 +234,7 @@ void InstanceList::deleteInstance(const InstanceId& id)
auto inst = getInstanceById(id);
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;
}

@@ -1667,6 +1667,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
{
return;
}
auto id = m_selectedInstance->id();
auto response = CustomMessageBox::selectable(
this,
tr("CAREFUL!"),
@@ -1677,7 +1678,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
)->exec();
if (response == QMessageBox::Yes)
{
MMC->instances()->deleteInstance(m_selectedInstance->id());
MMC->instances()->deleteInstance(id);
}
}

0 comments on commit 75ddbc8

Please sign in to comment.
You can’t perform that action at this time.