Skip to content

Commit 84d20bd

Browse files
committed
#3366 note: don't show text diff dialog if ignoreAllExternalModifications is enabled
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent cc5f694 commit 84d20bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/entities/note.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,12 @@ bool Note::storeNoteTextFileToDisk(bool &currentNoteTextChanged,
14731473
flags |= QIODevice::Text;
14741474
}
14751475

1476+
// Check if we should ignore all changes
1477+
const bool ignoreAllExternalModifications =
1478+
settings.value(QStringLiteral("ignoreAllExternalModifications")).toBool();
1479+
14761480
// Check if the file was modified externally by comparing checksums
1477-
if (fileExists() && !_fileChecksum.isEmpty()) {
1481+
if (!ignoreAllExternalModifications && fileExists() && !_fileChecksum.isEmpty()) {
14781482
// Read the current file content
14791483
QFile checkFile(fullNoteFilePath());
14801484
if (checkFile.open(QIODevice::ReadOnly)) {

0 commit comments

Comments
 (0)