Commit 892eb030 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix infinite undo stack

It might be possible that it was the reason of the slowdown bug,
but it needs to be checked.

parent 8651f909
...@@ -1586,8 +1586,11 @@ void KisDocument::slotUndoStackCleanChanged(bool value) ...@@ -1586,8 +1586,11 @@ void KisDocument::slotUndoStackCleanChanged(bool value)
void KisDocument::slotConfigChanged() void KisDocument::slotConfigChanged()
{ {
KisConfig cfg(true); KisConfig cfg(true);
if (!d->undoStack->isClean() && d->undoStack->undoLimit() != cfg.undoStackLimit()) {
if (d->undoStack->undoLimit() != cfg.undoStackLimit()) {
if (!d->undoStack->isClean()) {
d->undoStack->clear(); d->undoStack->clear();
d->undoStack->setUndoLimit(cfg.undoStackLimit()); d->undoStack->setUndoLimit(cfg.undoStackLimit());
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment