opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

Layers.java does not override add(x) #107

Closed stleusc closed 10 years ago

stleusc commented 10 years ago

I noticed in one of your recent changes that you replaced layers().set(2, xxx) with layers().add(xxx). I did that in my code before as well and then I noticed that calling add(xxx) on layers() goes directly down to modify the list. All other functions are actually in Layers.java to mark the layers as dirty, etc.

I think you might want to add add(xxx) to Layers.java to work alongside with add(int, layer) and set(int, layer).

hjanetzek commented 10 years ago

AbstractLists add(item) actually calls the implementation of add(index,item)