Modify

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)

fix1483.patch (821 bytes ) - added by JohannesRudolph 17 years ago.
the fix

Download all attachments as: .zip

Change History (7)

comment:1 by anonymous, 17 years ago

Component: CorePlugin

comment:2 by anonymous, 17 years ago

What slippymap version fo you use?

in reply to:  2 comment:3 by anonymous, 17 years ago

Replying to anonymous:

What slippymap version fo you use?

10120

comment:4 by JohannesRudolph, 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.

by JohannesRudolph, 17 years ago

Attachment: fix1483.patch added

the fix

comment:5 by JohannesRudolph, 17 years ago

Probably #424 is fixed with that as well. See my comment in #424.

comment:6 by anonymous, 17 years ago

Resolution: fixed
Status: newclosed

Applied in SVN. Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.