[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: [krita] libs/ui: Update the undo limit if it has changed
From: Boudewijn Rempt <null () kde ! org>
Date: 2019-05-03 11:25:30
Message-ID: 20190503112530.8CD2B620006 () eresida ! kde ! org
[Download RAW message or body]
Git commit 367c7973f7048968298aeb278f01127531c0ddce by Boudewijn Rempt.
Committed on 03/05/2019 at 11:24.
Pushed by rempt into branch 'master'.
Update the undo limit if it has changed
Note: this clears the undo stack, because otherwise we couldn't
update the limit.
CCMAIL:kimageshop@kde.org
M +5 -1 libs/ui/KisDocument.cpp
https://invent.kde.org/kde/krita/commit/367c7973f7048968298aeb278f01127531c0ddce
diff --git a/libs/ui/KisDocument.cpp b/libs/ui/KisDocument.cpp
index 8081036d55..272237a5f3 100644
--- a/libs/ui/KisDocument.cpp
+++ b/libs/ui/KisDocument.cpp
@@ -1581,7 +1581,11 @@ void KisDocument::slotUndoStackCleanChanged(bool value)
void KisDocument::slotConfigChanged()
{
KisConfig cfg(true);
- d->undoStack->setUndoLimit(cfg.undoStackLimit());
+ if (!d->undoStack->isClean() && d->undoStack->undoLimit() != cfg.undoStackLimit()) {
+ d->undoStack->clear();
+ d->undoStack->setUndoLimit(cfg.undoStackLimit());
+ }
+
d->autoSaveDelay = cfg.autoSaveInterval();
setNormalAutoSaveInterval();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic