Further reduced CPU load when hovering in the hex viewer
This commit is contained in:
@@ -42,7 +42,7 @@ namespace Bloom::Widgets
|
||||
this->displayAbsoluteAddressAction->setCheckable(true);
|
||||
|
||||
this->setAddressType(this->state.settings.addressLabelType);
|
||||
this->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||
this->setItemIndexMethod(QGraphicsScene::ItemIndexMethod::NoIndex);
|
||||
|
||||
QObject::connect(
|
||||
InsightSignals::instance(),
|
||||
@@ -615,9 +615,10 @@ namespace Bloom::Widgets
|
||||
|
||||
this->hoverRectX->setVisible(true);
|
||||
this->hoverRectY->setVisible(true);
|
||||
this->hoverRectX->update();
|
||||
this->hoverRectY->update();
|
||||
}
|
||||
|
||||
this->update();
|
||||
emit this->hoveredAddress(byteItem.startAddress);
|
||||
}
|
||||
|
||||
@@ -628,7 +629,8 @@ namespace Bloom::Widgets
|
||||
|
||||
this->hoverRectX->setVisible(false);
|
||||
this->hoverRectY->setVisible(false);
|
||||
this->update();
|
||||
this->hoverRectX->update();
|
||||
this->hoverRectY->update();
|
||||
|
||||
emit this->hoveredAddress(std::nullopt);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Bloom::Widgets
|
||||
this->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn);
|
||||
this->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
|
||||
this->setViewportUpdateMode(QGraphicsView::ViewportUpdateMode::MinimalViewportUpdate);
|
||||
this->setOptimizationFlag(QGraphicsView::DontSavePainterState, true);
|
||||
this->setOptimizationFlag(QGraphicsView::DontAdjustForAntialiasing, true);
|
||||
this->setCacheMode(QGraphicsView::CacheModeFlag::CacheNone);
|
||||
|
||||
Reference in New Issue
Block a user