diff --git a/sources/editor/ui/dynamictextfieldeditor.cpp b/sources/editor/ui/dynamictextfieldeditor.cpp index 145dd959a..5b48d30fd 100644 --- a/sources/editor/ui/dynamictextfieldeditor.cpp +++ b/sources/editor/ui/dynamictextfieldeditor.cpp @@ -31,6 +31,7 @@ #include #include #include +#include DynamicTextFieldEditor::DynamicTextFieldEditor(QETElementEditor *editor, PartDynamicTextField *text_field, @@ -143,7 +144,18 @@ void DynamicTextFieldEditor::updateForm() ui->m_rotation_point_center_cb->setChecked(m_text_field.data()->rotationPointCenter()); #ifdef BUILD_WITHOUT_KF5 #else - m_color_kpb -> setColor(m_text_field.data() -> color()); + //Block signals while loading the colour into the button. + //KColorButton::changed fires on a programmatic setColor() as well + //as on user interaction, and m_color_kpb_changed() applies the new + //colour to *every* selected part -- so merely showing the first + //part's colour would overwrite the colour of all the others. + //The other widgets above are immune because they are wired to + //user-only signals (editingFinished, clicked), which setValue() + //and setChecked() do not emit. + { + const QSignalBlocker blocker(m_color_kpb); + m_color_kpb -> setColor(m_text_field.data() -> color()); + } #endif ui -> m_width_sb -> setValue(m_text_field.data() -> textWidth()); ui -> m_font_pb -> setText(m_text_field -> font().family());