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
This commit is contained in:
blacksun
2018-03-13 16:29:18 +00:00
parent f2fd446bb5
commit 22f657e65f

View File

@@ -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)