Added dialog box and functionality to mainwindow delete button.
This commit is contained in:
parent
6122e0cbc3
commit
4f57207fd2
@ -291,7 +291,17 @@ void MainWindow::on_mainToolBar_visibilityChanged ( bool )
|
|||||||
|
|
||||||
void MainWindow::on_actionDeleteInstance_triggered()
|
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()
|
void MainWindow::on_actionRenameInstance_triggered()
|
||||||
|
Loading…
Reference in New Issue
Block a user