Fixed byte item hover bug

This commit is contained in:
Nav
2021-10-30 16:26:30 +01:00
parent 66879df349
commit 1dae5cbb00
2 changed files with 9 additions and 0 deletions

View File

@@ -172,6 +172,14 @@ void ByteItemGraphicsScene::onByteWidgetLeave() {
}
}
bool ByteItemGraphicsScene::event(QEvent* event) {
if (event->type() == QEvent::Type::GraphicsSceneLeave && this->hoveredByteWidget.has_value()) {
this->onByteWidgetLeave();
}
return QGraphicsScene::event(event);
}
void ByteItemGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent) {
auto hoveredItems = this->items(mouseEvent->scenePos());
if (!hoveredItems.empty()) {

View File

@@ -48,6 +48,7 @@ namespace Bloom::Widgets
void byteWidgetsAdjusted();
protected:
bool event(QEvent* event) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent) override;
private: