Skip to content

Commit

Permalink
Delete Confirmation Details (#155)
Browse files Browse the repository at this point in the history
Move the list of selected resources into the details section.
  • Loading branch information
RobertBColton authored Aug 19, 2020
1 parent d04dc1b commit ba3ca3b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,15 @@ void MainWindow::on_actionDelete_triggered() {
selectedNames += (node == *selectedNodes.begin() ? "" : ", ") + QString::fromStdString(node->name());
}

QMessageBox::StandardButton reply;
reply = QMessageBox::question(
this, tr("Delete Resources"),
tr("Do you want to delete the following resources from the project?\n%0").arg(selectedNames),
QMessageBox::Yes | QMessageBox::No);
if (reply != QMessageBox::Yes) return;
QMessageBox mb(
QMessageBox::Icon::Question,
tr("Delete Resources"),
tr("Do you want to delete the selected resources from the project?"),
QMessageBox::Yes | QMessageBox::No, this
);
mb.setDetailedText(selectedNames);
int ret = mb.exec();
if (ret != QMessageBox::Yes) return;

// close subwindows
for (auto node : selectedNodes) {
Expand Down

0 comments on commit ba3ca3b

Please sign in to comment.