Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.4, 5.10.1
-
None
-
Linux / Windows / Android / Any
Description
MapPolyline shows(renders) previous visible state if path was cleared.
Screencast: https://gfycat.com/EntireUncommonAsiandamselfly
0) Create Map, add MapPolyline. Setup path coords list. Pan map around. Polyline will be correctly rendered at desired location (.
1) Clear Polyline path.Polyline will "stick" to the screen at it's current location (in terms of window coords), and will remain there.
2) Update Polyline path with new non-empty coords set, and Polyline will be rendered at correct location.
Expected result: when Polyline path is empty, MapPolyline should not be rendered.
This happens when path is filled with empty js array "[]", with empty "QVariantList", with empty "QGeoPath", or with empty geopath created with "QtPositioning.path()"
Check the minimal example:
0) Grid is added to visualize map pan
1) "Fix" button setups coords.
2) "Array (Qt5.9, Qt5.10)" sets empty array to polyline path.
3) "setPath (Qt5.10)" uses setPath method to set polyline path with geopath.