mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user