Opened 17 years ago
Closed 17 years ago
#1483 closed defect (fixed)
[PATCH] two slippy map plugin layers
Reported by: | anonymous | Owned by: | framm |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Plugin | Version: | |
Keywords: | Cc: |
Description
open josm, open gpx. delete gpx, attempt to delete slippy map layer - another one is added instead. delete one of these, try to delete the other one - agin, two appear.
Attachments (1)
Change History (7)
comment:1 by , 17 years ago
Component: | Core → Plugin |
---|
follow-up: 3 comment:2 by , 17 years ago
comment:4 by , 17 years ago
Summary: | two slippy map plugin layers → [PATCH] two slippy map plugin layers |
---|
The problem happens, when you delete all the layers. When the last layer is deleted Main.removeLayer deletes the last layer as well as the map by calling Main.setMapFrame(null). setMapFrame notifies all plugins with pluginMapFrameInitialized.
When SlippyMapPlugin is notified it always initializes itself so that in the result setMapFrame is called again and even another instance of the layer is initialized.
The solution is to only initialize the plugin if pluginMapFrameInitialized is called with a non-null parameter.
What slippymap version fo you use?