Fix issue with drawing elements with false style (#778)
When the style of the drawable has changed the level needs to adjusted before draw(...) is called - in any other case then you have the risk, that the false style will be applied to the drawable [since the false bucket (with wrong style) will be returned when calling t.buckets.get{.*}Bucket(level)]
This commit is contained in:
parent
ab32f25a7c
commit
8602b5780a
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright 2014 Hannes Janetzek
|
||||
* Copyright 2016-2019 devemux86
|
||||
* Copyright 2020 marq24
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
@ -201,11 +202,11 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
||||
|
||||
for (Drawable d : tmpDrawables) {
|
||||
Style style = d.getStyle();
|
||||
draw(t, level, d, style);
|
||||
|
||||
if (style != lastStyle)
|
||||
if (lastStyle != null && lastStyle != style)
|
||||
level += 2;
|
||||
|
||||
draw(t, level, d, style);
|
||||
lastStyle = style;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user