summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-24 21:19:05 +0200
committerDanilo M. <danix@danix.xyz>2026-08-24 21:19:05 +0200
commitc08ca00c36d06d7b1bbd5ce73d4d4dc3ce157e1c (patch)
treeb02f035e9b30ffc828dc00a4ae1760a3edf9598b /src
parentcf88c95aa5f16b918ebf207b3e323e44c525b440 (diff)
downloadqtmaildir-c08ca00c36d06d7b1bbd5ce73d4d4dc3ce157e1c.tar.gz
qtmaildir-c08ca00c36d06d7b1bbd5ce73d4d4dc3ce157e1c.zip
fix(compose): a resumed draft does not re-seed on a From: change
A resumed draft kept m_signatureChosen false, so a From: change re-seeded the signature and rewrote what the user had saved, inserting the new account's where the saved block no longer matched a known file. The draft is the user's deliberate prior state and must not follow a From: change, so the draft branch marks it chosen.
Diffstat (limited to 'src')
-rw-r--r--src/composewindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/composewindow.cpp b/src/composewindow.cpp
index 94a3f46..d781e52 100644
--- a/src/composewindow.cpp
+++ b/src/composewindow.cpp
@@ -792,6 +792,11 @@ void ComposeWindow::seedSignature()
// verbatim. Seeding again would append a second one.
if (m_context.kind == ComposeContext::Kind::Draft) {
none->setChecked(true);
+ // The draft IS the user's choice: its signature is deliberate prior
+ // state, so a From: change must not follow the new account and
+ // rewrite what was saved. Marking it chosen keeps the same invariant
+ // the switch actions set, without ever having run the switch.
+ m_signatureChosen = true;
return;
}