﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11838	Clean up MapView, put layer management to new class.	michael2402	michael2402	"== Move the layer core to a new class. ==

- Move all layer code to a new ''LayerManager''
- Move the active layer code to ''LayerManagerWithActive''
- Define a new listener interface. Events are now wrapped in objects for easy extensibility and all run in the UI thread
  - LayerAddEvent
  - LayerRemoveEvent
  - LayerOrderChangeEvent
  - ActiveLayerChangeEvent
- The LayerManager is completely synchronized
- Provide adapter layer methods in MapView to not break plugins.
- Make the layer list accessible using Main.getLayers() and Main.getTemporarayLayers()

This patch is still not finished, since we should replace all layer access in JOSM with this new manager. But JOSM already works using the compatibility methods.

Since this is mostly a rewrite of the layer code, I cannot provide smaller patches.

Implementing this will require several steps, yielding at least one patch each:

== Add the LayerManager ==
The main change. We replace the mapView layer code with the new code and add compatibility methods.
I'll be doing this between May 23 and May 27.
See #12863

== Add temporary layers ==
We can use the LayerManager to manage temporary layers as well.

== Migration ==
Simply replace ''Main.map.mapView.getActiveLayer()'' with ''Main.getLayers().getActiveLayer()'' and so on. Most accesses to this are static, so they should be easy to find.

For some modules, it might be possible to add the LayerManager as private field. That way, we get rid of the dependency on a static Main access and make testing easier.

Migration patches: #12955, #12943, #12983, #12953."	enhancement	closed	normal	16.06	Core		fixed	layers, gsoc-core	Don-vip bastiK stoecker
