Elements panel: now require user confirmation before deleting a title block template.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1420 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2011-12-31 02:30:31 +00:00
parent 853d169549
commit 7c2716ae35
3 changed files with 117 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include "qetproject.h"
#include "diagram.h"
#include "qeticons.h"
#include "templatedeleter.h"
/*
Lorsque le flag ENABLE_PANEL_WIDGET_DND_CHECKS est defini, le panel
@@ -294,7 +295,9 @@ void ElementsPanelWidget::removeTitleBlockTemplate() {
if (current_item && elements_panel -> itemIsATitleBlockTemplate(current_item)) {
QETProject *parent_project = elements_panel -> projectForTitleBlockTemplate(current_item);
QString template_name = elements_panel -> nameOfTitleBlockTemplate(current_item);
parent_project -> removeTemplateByName(template_name);
TitleBlockTemplateLocation template_location(parent_project, template_name);
TitleBlockTemplateDeleter template_deleter(template_location, this);
template_deleter.exec();
}
}