[qet] qet/qet: [5269] Fix : change made to a text group was not applyed when edited from the element properties dialog

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5269
Author:   blacksun
Date:     2018-03-13 17:29:18 +0100 (Tue, 13 Mar 2018)
Log Message:
-----------
Fix : change made to a text group was not applyed when edited from the element properties dialog

Modified Paths:
--------------
    trunk/sources/ui/dynamicelementtextitemeditor.cpp

Modified: trunk/sources/ui/dynamicelementtextitemeditor.cpp
===================================================================
--- trunk/sources/ui/dynamicelementtextitemeditor.cpp	2018-03-13 16:20:59 UTC (rev 5268)
+++ trunk/sources/ui/dynamicelementtextitemeditor.cpp	2018-03-13 16:29:18 UTC (rev 5269)
@@ -38,7 +38,6 @@
     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 @@
 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)


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/