mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Diagram editor : add in the tree widget use to edit the property of dynamic text item, two news items for edit the X and Y pos of the text.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5088 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -120,6 +120,22 @@ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text)
|
||||
m_tree_view->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
QUndoCommand *DynamicElementTextItemEditor::associatedUndo() const
|
||||
{
|
||||
QUndoCommand *parent_undo = new QUndoCommand(tr("Modifier un texte d'élément"));
|
||||
for (DynamicElementTextItem *deti : m_element->dynamicTextItems())
|
||||
m_model->undoForEditedText(deti, parent_undo);
|
||||
|
||||
if(parent_undo->childCount() >= 1)
|
||||
{
|
||||
if(parent_undo->childCount() >= 2)
|
||||
parent_undo->setText(tr("Modifier %1 textes d'élément").arg(QString::number(parent_undo->childCount())));
|
||||
return parent_undo;
|
||||
}
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DynamicElementTextItemEditor::dataEdited(DynamicElementTextItem *deti)
|
||||
{
|
||||
Q_UNUSED(deti)
|
||||
|
||||
Reference in New Issue
Block a user