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.

BUG:408255
CCBUG:408133
parent 8651f909
......@@ -1586,8 +1586,11 @@ void KisDocument::slotUndoStackCleanChanged(bool value)
void KisDocument::slotConfigChanged()
{
KisConfig cfg(true);
if (!d->undoStack->isClean() && d->undoStack->undoLimit() != cfg.undoStackLimit()) {
d->undoStack->clear();
if (d->undoStack->undoLimit() != cfg.undoStackLimit()) {
if (!d->undoStack->isClean()) {
d->undoStack->clear();
}
d->undoStack->setUndoLimit(cfg.undoStackLimit());
}
......
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