Fixed byte item hover bug
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Bloom::Widgets
|
||||
void byteWidgetsAdjusted();
|
||||
|
||||
protected:
|
||||
bool event(QEvent* event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent) override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user