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