View ordering

Issue #1 resolved
Nadia Polikarpova repo owner created an issue

All map items (views) are stored in one data structure. In the beginning they are added in the right order (e.g. stations after lines) so that the z-ordering is ok, but if you add city items later the z-ordering can be wrong. Instead we could have a list of lists and some association between the city data structures and those lists, and also maybe a view factory to create views for each city item.

Comments (4)

  1. Nadia Polikarpova reporter

    Implemented a workaround: now on every map update all views are removed and then added again. This is potentially slower, in case you do a lot of updates (of non-mobile objects), but the difference is unnoticeable on existing examples.

  2. Nadia Polikarpova reporter
    • changed status to open

    It turned out that the workaround causes a problem if a view if modified (e.g. highlighted), as those modifications are lost after an update.

  3. Nadia Polikarpova reporter

    Fixed for real now: introduces a figure group for each kind of city objects; those figure groups are added to world in correct order, views only have access to those groups and not to the world.

  4. Log in to comment