1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fixed Z-order issue

This commit is contained in:
Martin Tůma 2016-09-19 01:45:28 +02:00
parent 3e421c6aba
commit e9b32fb582
3 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ void RouteItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Q_UNUSED(event); Q_UNUSED(event);
_pen.setWidthF(HOVER_WIDTH * 1.0/scale()); _pen.setWidthF(HOVER_WIDTH * 1.0/scale());
setZValue(3.0); setZValue(zValue() + 1.0);
update(); update();
} }
@ -153,6 +153,6 @@ void RouteItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Q_UNUSED(event); Q_UNUSED(event);
_pen.setWidthF(ROUTE_WIDTH * 1.0/scale()); _pen.setWidthF(ROUTE_WIDTH * 1.0/scale());
setZValue(0); setZValue(zValue() - 1.0);
update(); update();
} }

View File

@ -122,7 +122,7 @@ void TrackItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Q_UNUSED(event); Q_UNUSED(event);
_pen.setWidthF(HOVER_WIDTH * 1.0/scale()); _pen.setWidthF(HOVER_WIDTH * 1.0/scale());
setZValue(3.0); setZValue(zValue() + 1.0);
update(); update();
} }
@ -131,6 +131,6 @@ void TrackItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Q_UNUSED(event); Q_UNUSED(event);
_pen.setWidthF(TRACK_WIDTH * 1.0/scale()); _pen.setWidthF(TRACK_WIDTH * 1.0/scale());
setZValue(0); setZValue(zValue() - 1.0);
update(); update();
} }

View File

@ -131,7 +131,7 @@ void WaypointItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
prepareGeometryChange(); prepareGeometryChange();
_hover = true; _hover = true;
updateShape(); updateShape();
setZValue(3.0); setZValue(zValue() + 1.0);
} }
void WaypointItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void WaypointItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
@ -141,5 +141,5 @@ void WaypointItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
prepareGeometryChange(); prepareGeometryChange();
_hover = false; _hover = false;
updateShape(); updateShape();
setZValue(0); setZValue(zValue() - 1.0);
} }