Commit a5ef0656 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Remove update compressor in KoShapeManager

Anyway we always recalculate tree before any access to the shapes

CCBUG:410572
BACKPORT:krita/4.2
parent 4790c612
......@@ -588,7 +588,7 @@ void KoShapeManager::notifyShapeChanged(KoShape *shape)
if (d->aggregate4update.contains(shape)) {
return;
}
const bool wasEmpty = d->aggregate4update.isEmpty();
d->aggregate4update.insert(shape);
d->shapeIndexesBeforeUpdate.insert(shape, shape->zIndex());
......@@ -597,10 +597,6 @@ void KoShapeManager::notifyShapeChanged(KoShape *shape)
Q_FOREACH (KoShape *child, container->shapes())
notifyShapeChanged(child);
}
if (wasEmpty && !d->aggregate4update.isEmpty()) {
d->updateTreeCompressor.start();
}
}
QList<KoShape*> KoShapeManager::shapes() const
......
......@@ -28,7 +28,6 @@
#include "KoShapeContainer.h"
#include "KoShapeManager.h"
#include <KoRTree.h>
#include "kis_thread_safe_signal_compressor.h"
class KoCanvasBase;
......@@ -44,10 +43,8 @@ public:
canvas(c),
tree(4, 2),
q(shapeManager),
shapeInterface(shapeManager),
updateTreeCompressor(100, KisSignalCompressor::FIRST_INACTIVE)
shapeInterface(shapeManager)
{
connect(&updateTreeCompressor, SIGNAL(timeout()), q, SLOT(updateTree()));
}
~Private() {
......@@ -118,7 +115,6 @@ public:
QHash<KoShape*, int> shapeIndexesBeforeUpdate;
KoShapeManager *q;
KoShapeManager::ShapeInterface shapeInterface;
KisThreadSafeSignalCompressor updateTreeCompressor;
};
#endif
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