Commit 1609d61b authored by Boudewijn Rempt's avatar Boudewijn Rempt

Keep local modified variable

https://bugs.kde.org/show_bug.cgi?id=310310 quest
parent baa23899
......@@ -125,7 +125,8 @@ public:
storeInternal(false),
isLoading(false),
undoStack(0),
parentPart(0)
parentPart(0),
modified(0)
{
confirmNonNativeSave[0] = true;
confirmNonNativeSave[1] = true;
......@@ -187,6 +188,8 @@ public:
KoPart *parentPart;
bool modified;
};
KoDocument::KoDocument(KoPart *parent, KUndo2Stack *undoStack)
......@@ -464,7 +467,7 @@ bool KoDocument::isAutoErrorHandlingEnabled() const
void KoDocument::slotAutoSave()
{
if (isModified() && d->modifiedAfterAutosave && !d->isLoading) {
if (d->modified && d->modifiedAfterAutosave && !d->isLoading) {
// Give a warning when trying to autosave an encrypted file when no password is known (should not happen)
if (d->specialOutputFlag == SaveEncrypted && d->password.isNull()) {
// That advice should also fix this error from occurring again
......@@ -1775,6 +1778,7 @@ void KoDocument::setModified(bool mod)
if (mod == isModified())
return;
d->modified = mod;
d->parentPart->setModified(mod);
if (mod) {
......@@ -2176,6 +2180,7 @@ int KoDocument::pageCount() const {
void KoDocument::setupOpenFileSubProgress() {}
void KoDocument::setModified() {
d->modified = true;
d->parentPart->setModified();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment