1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +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);
_pen.setWidthF(HOVER_WIDTH * 1.0/scale());
setZValue(3.0);
setZValue(zValue() + 1.0);
update();
}
@ -153,6 +153,6 @@ void RouteItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Q_UNUSED(event);
_pen.setWidthF(ROUTE_WIDTH * 1.0/scale());
setZValue(0);
setZValue(zValue() - 1.0);
update();
}

View File

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

View File

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