Add # of shortcuts to deletion confirmation screen instead
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
d2ee023788
commit
4214571cff
2 changed files with 6 additions and 6 deletions
|
@ -1409,11 +1409,15 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
|||
}
|
||||
auto id = m_selectedInstance->id();
|
||||
|
||||
QString shortcutStr;
|
||||
auto shortcuts = m_selectedInstance->shortcuts();
|
||||
if (!shortcuts.isEmpty())
|
||||
shortcutStr = tr(" and its %n registered shortcut(s)", "", shortcuts.size());
|
||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Deletion"),
|
||||
tr("You are about to delete \"%1\" and all of its shortcut(s).\n"
|
||||
tr("You are about to delete \"%1\"%2.\n"
|
||||
"This may be permanent and will completely delete the instance.\n\n"
|
||||
"Are you sure?")
|
||||
.arg(m_selectedInstance->name()),
|
||||
.arg(m_selectedInstance->name(), shortcutStr),
|
||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
->exec();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue