forked from qt-creator/qt-creator
Utils: Fix StringAspect TextEditDisplay
Remove the unnecessary re-setting of the text edit content due to the undo => edit => undo => edit connection. Fixes: QTCREATORBUG-29688 Change-Id: I7838ed594ae3741df757fa5eb3cdd90506428be3 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1229,14 +1229,19 @@ void StringAspect::addToLayout(LayoutItem &parent)
|
||||
&QTextEdit::setPlaceholderText);
|
||||
|
||||
connect(textEditDisplay, &QTextEdit::textChanged, this, [this, textEditDisplay]() {
|
||||
d->undoable.set(undoStack(), textEditDisplay->toPlainText());
|
||||
handleGuiChanged();
|
||||
if (textEditDisplay->toPlainText() != d->undoable.get()) {
|
||||
d->undoable.set(undoStack(), textEditDisplay->toPlainText());
|
||||
handleGuiChanged();
|
||||
}
|
||||
});
|
||||
|
||||
connect(&d->undoable.m_signal,
|
||||
&UndoSignaller::changed,
|
||||
textEditDisplay,
|
||||
[this, textEditDisplay] { textEditDisplay->setText(d->undoable.get()); });
|
||||
[this, textEditDisplay] {
|
||||
if (textEditDisplay->toPlainText() != d->undoable.get())
|
||||
textEditDisplay->setText(d->undoable.get());
|
||||
});
|
||||
break;
|
||||
}
|
||||
case LabelDisplay: {
|
||||
|
Reference in New Issue
Block a user