From 22f657e65f1652616c846a934b2034040b1e4e20 Mon Sep 17 00:00:00 2001 From: blacksun Date: Tue, 13 Mar 2018 16:29:18 +0000 Subject: [PATCH] Fix : change made to a text group was not applyed when edited from the element properties dialog git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5269 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/ui/dynamicelementtextitemeditor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/ui/dynamicelementtextitemeditor.cpp b/sources/ui/dynamicelementtextitemeditor.cpp index 34de13311..c11f9aebf 100644 --- a/sources/ui/dynamicelementtextitemeditor.cpp +++ b/sources/ui/dynamicelementtextitemeditor.cpp @@ -38,7 +38,6 @@ DynamicElementTextItemEditor::DynamicElementTextItemEditor(Element *element, QWi ui->setupUi(this); ui->m_tree_view->setItemDelegate(new DynamicTextItemDelegate(ui->m_tree_view)); - ui->m_tree_view->installEventFilter(this); ui->m_remove_selection->setDisabled(true); setElement(element); @@ -171,9 +170,12 @@ void DynamicElementTextItemEditor::setCurrentGroup(ElementTextItemGroup *group) QUndoCommand *DynamicElementTextItemEditor::associatedUndo() const { QUndoCommand *parent_undo = new QUndoCommand(tr("Modifier un texte d'élément")); - for (DynamicElementTextItem *deti : m_element->dynamicTextItems()) + for (DynamicElementTextItem *deti : m_element.data()->dynamicTextItems()) m_model->undoForEditedText(deti, parent_undo); + for (ElementTextItemGroup *grp : m_element.data()->textGroups()) + m_model->undoForEditedGroup(grp, parent_undo); + if(parent_undo->childCount() >= 1) { if(parent_undo->childCount() >= 2)