From 6c76b1f6a8cca2979df2c0ff13f6a9822375bb01 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Mon, 10 Aug 2026 22:37:23 +1200 Subject: [PATCH] Fix bugtracker #312: wire text rotation not preserved on reload RotateTextsCommand::undo()/redo() called cti->forceMovedByUser(...) instead of cti->forceRotateByUser(...) for ConductorTextItem entries - a copy-paste mix-up between the two parallel user-override flags that track independently whether a conductor's text was manually moved vs manually rotated. Because rotate_by_user_ was never actually set to true, the rotation attribute-writing gate in Conductor::toXml() (which checks wasRotatedByUser()) never fired, so a manual rotation applied via "Orienter les textes" (Edit > Orienter les textes / Ctrl+Space) was silently dropped on save: the rotation displayed correctly until the project was closed and reopened, at which point it reverted to default orientation. Fix swaps both calls to forceRotateByUser(...), matching what the constructor reads via wasRotatedByUser() when building m_cond_texts. Verified: clean rebuild (506/506, no new warnings). Live-verified under Xvfb that RotateTextsCommand's rotation correctly animates and applies to ConductorTextItem text (confirmed via the "Orienter les textes" dialog). A full save/close/reopen round-trip on a from-scratch two-element wire was attempted but not completed due to unreliable terminal-to-terminal wire drawing via synthetic mouse events in the window-manager-less Xvfb sandbox; confidence in the fix instead rests on tracing the exact save-gate code path (Conductor::toXml() gates solely on wasRotatedByUser(), which the constructor/undo/redo all already correctly reference elsewhere for the parallel moved-by-user flag). --- sources/undocommand/rotatetextscommand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/undocommand/rotatetextscommand.cpp b/sources/undocommand/rotatetextscommand.cpp index f2248479f..7239d1b98 100644 --- a/sources/undocommand/rotatetextscommand.cpp +++ b/sources/undocommand/rotatetextscommand.cpp @@ -89,7 +89,7 @@ void RotateTextsCommand::undo() m_anim_group->start(); for(ConductorTextItem *cti : m_cond_texts.keys()) - cti->forceMovedByUser(m_cond_texts.value(cti)); + cti->forceRotateByUser(m_cond_texts.value(cti)); } void RotateTextsCommand::redo() @@ -101,7 +101,7 @@ void RotateTextsCommand::redo() m_anim_group->start(); for(ConductorTextItem *cti : m_cond_texts.keys()) - cti->forceMovedByUser(true); + cti->forceRotateByUser(true); } void RotateTextsCommand::openDialog()