summaryrefslogtreecommitdiffstats
path: root/gui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r--gui/mainwindow.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index dda12941..3f0221b2 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -291,7 +291,17 @@ void MainWindow::on_mainToolBar_visibilityChanged ( bool )
void MainWindow::on_actionDeleteInstance_triggered()
{
-
+ Instance* inst = selectedInstance();
+ if (inst)
+ {
+ int response = QMessageBox::question(this, "CAREFUL",
+ QString("This is permanent! Are you sure?\nAbout to delete: ") + inst->name());
+ if (response == QMessageBox::Yes)
+ {
+ QDir(inst->rootDir()).removeRecursively();
+ instList.loadList();
+ }
+ }
}
void MainWindow::on_actionRenameInstance_triggered()