[krita] libs/ui: Update the undo limit if it has changed
Boudewijn Rempt
null at kde.org
Fri May 3 12:25:30 BST 2019
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 at 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();
}
More information about the kimageshop
mailing list