Delete shortcut when deleting instances
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
0a89f5cfaa
commit
d3f337d6ef
11 changed files with 168 additions and 67 deletions
|
@ -1207,7 +1207,10 @@ void MainWindow::renameGroup(QString group)
|
|||
|
||||
void MainWindow::undoTrashInstance()
|
||||
{
|
||||
APPLICATION->instances()->undoTrashInstance();
|
||||
if (!APPLICATION->instances()->undoTrashInstance())
|
||||
QMessageBox::warning(
|
||||
this, tr("Failed to undo trashing instance"),
|
||||
tr("Some instances and shortcuts could not be restored.\nPlease check your trashbin to manually restore them."));
|
||||
ui->actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
|
||||
}
|
||||
|
||||
|
@ -1407,7 +1410,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
|||
auto id = m_selectedInstance->id();
|
||||
|
||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Deletion"),
|
||||
tr("You are about to delete \"%1\".\n"
|
||||
tr("You are about to delete \"%1\" and all of its shortcut(s).\n"
|
||||
"This may be permanent and will completely delete the instance.\n\n"
|
||||
"Are you sure?")
|
||||
.arg(m_selectedInstance->name()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue