From 4e754cfac1e4468e2b0c89cfaa49855d4074e3ed Mon Sep 17 00:00:00 2001 From: ispyisail Date: Fri, 19 Jun 2026 07:43:27 +1200 Subject: [PATCH] Conductor dock: sync to external property changes (#500) The dock editor snapshotted the conductor once and never refreshed, so a change made via the modal Edit-conductor dialog left the dock holding stale values; on deselection apply() wrote that stale snapshot back, overwriting the dialog's change. Subscribe to Conductor::propertiesChange and refresh via updateUi() so the dock mirrors external edits and apply() becomes a no-op when nothing changed in the dock. --- sources/ui/conductorpropertieseditorwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/ui/conductorpropertieseditorwidget.cpp b/sources/ui/conductorpropertieseditorwidget.cpp index 5e4c15701..384e43f11 100644 --- a/sources/ui/conductorpropertieseditorwidget.cpp +++ b/sources/ui/conductorpropertieseditorwidget.cpp @@ -100,7 +100,15 @@ ConductorPropertiesEditorWidget::~ConductorPropertiesEditorWidget() void ConductorPropertiesEditorWidget::setConductor(Conductor *conductor) { if (!conductor) return; + if (m_conductor && m_conductor != conductor) + disconnect(m_conductor, &Conductor::propertiesChange, + this, &ConductorPropertiesEditorWidget::updateUi); m_conductor = conductor; + //Keep the dock in sync when the conductor is edited elsewhere (e.g. the + //modal "Edit conductor" dialog); otherwise a stale snapshot would be + //written back on the next apply() and overwrite that change (issue #500). + connect(m_conductor, &Conductor::propertiesChange, + this, &ConductorPropertiesEditorWidget::updateUi, Qt::UniqueConnection); setEnabled(true); updateUi(); }