Fix perf issues zoomed in again
This commit is contained in:
parent
69d9a9e3f1
commit
5fa5a63d1a
3 changed files with 26 additions and 6 deletions
|
|
@ -9,6 +9,8 @@
|
|||
#include <QScrollBar>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include <QtNodes/internal/ConnectionGraphicsObject.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
class ZoomGraphicsView : public QtNodes::GraphicsView {
|
||||
|
|
@ -39,7 +41,8 @@ public:
|
|||
auto cacheMode = highZoom ? QGraphicsItem::DeviceCoordinateCache
|
||||
: QGraphicsItem::NoCache;
|
||||
for (QGraphicsItem *item : scene()->items()) {
|
||||
if (item->type() == QGraphicsProxyWidget::Type)
|
||||
if (item->type() == QGraphicsProxyWidget::Type ||
|
||||
item->type() == QtNodes::ConnectionGraphicsObject::Type)
|
||||
item->setCacheMode(cacheMode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue