mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Element editor : text field can now have a composite text as source of text
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5265 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "QPropertyUndoCommand/qpropertyundocommand.h"
|
||||
#include "qetelementeditor.h"
|
||||
#include "qetapp.h"
|
||||
#include "compositetexteditdialog.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QGraphicsItem>
|
||||
@@ -277,3 +278,17 @@ void DynamicTextFieldEditor::on_m_text_from_cb_activated(int index)
|
||||
undoStack().push(undo);
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicTextFieldEditor::on_m_composite_text_pb_clicked()
|
||||
{
|
||||
CompositeTextEditDialog ctd(m_text_field.data()->compositeText(), this);
|
||||
if(ctd.exec())
|
||||
{
|
||||
QString ct = ctd.plainText();
|
||||
if(ct != m_text_field.data()->compositeText())
|
||||
{
|
||||
QPropertyUndoCommand *undo = new QPropertyUndoCommand(m_text_field.data(), "compositeText", m_text_field.data()->compositeText(), ctd.plainText());
|
||||
undoStack().push(undo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user