mirror of
https://github.com/leozide/leocad
synced 2025-01-14 08:01:45 +01:00
Prompt before deleting minifig templates. Fixes #286.
This commit is contained in:
parent
3128a078cb
commit
8f7f3984a7
1 changed files with 7 additions and 1 deletions
|
@ -197,7 +197,13 @@ void lcQMinifigDialog::on_TemplateSaveButton_clicked()
|
||||||
|
|
||||||
void lcQMinifigDialog::on_TemplateDeleteButton_clicked()
|
void lcQMinifigDialog::on_TemplateDeleteButton_clicked()
|
||||||
{
|
{
|
||||||
mMinifigWidget->DeleteTemplate(ui->TemplateComboBox->currentText());
|
QString Template = ui->TemplateComboBox->currentText();
|
||||||
|
QString Question = tr("Are you sure you want to delete the template '%1'?").arg(Template);
|
||||||
|
|
||||||
|
if (QMessageBox::question(this, tr("Delete Template"), Question, QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mMinifigWidget->DeleteTemplate(Template);
|
||||||
|
|
||||||
UpdateTemplateCombo();
|
UpdateTemplateCombo();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue