From 36c6415a9a3c22e3d4ae6d6b2d55091a7c179406 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 14 Mar 2019 19:48:13 +1100 Subject: [PATCH] fixed text effect crash --- effects/fields/stringfield.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/effects/fields/stringfield.cpp b/effects/fields/stringfield.cpp index 3b3d7579a..257aa2fb5 100644 --- a/effects/fields/stringfield.cpp +++ b/effects/fields/stringfield.cpp @@ -37,7 +37,15 @@ QWidget *StringField::CreateWidget() void StringField::UpdateWidgetValue(QWidget *widget, double timecode) { - static_cast(widget)->setHtml(GetValueAt(timecode).toString()); + TextEditEx* text = static_cast(widget); + + text->blockSignals(true); + + QTextCursor cursor = text->textCursor(); + text->setHtml(GetValueAt(timecode).toString()); + text->setTextCursor(cursor); + + text->blockSignals(false); } void StringField::UpdateFromWidget(const QString &s)