Skip to content

Commit 7214ed7

Browse files
committed
#3396 checksum: fix issues when removeTrailingSpaces is enabled
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 9e22c33 commit 7214ed7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# QOwnNotes Changelog
22

3+
## 25.12.3
4+
5+
- Fixed an issue where the diff dialog was incorrectly triggered when both
6+
`enableNoteChecksumChecks` and `Editor/removeTrailingSpaces` settings were
7+
enabled (for [#3396](https://github.com/pbek/QOwnNotes/issues/3396))
8+
39
## 25.12.2
410

511
- Try to fix PDF export not generating color output on some computers

src/entities/note.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,12 @@ bool Note::stripTrailingSpaces(int skipLine) {
23022302

23032303
if (wasStripped) {
23042304
_noteText = noteTextLines.join(detectNewlineCharacters());
2305+
2306+
// Clear the checksum before storing to skip the external modification check
2307+
// since we're making an internal modification (stripping trailing spaces).
2308+
// The checksum will be recalculated and stored after writing to disk.
2309+
_fileChecksum.clear();
2310+
23052311
store();
23062312
}
23072313

0 commit comments

Comments
 (0)