Modify

Opened 8 years ago

Closed 8 years ago

#12896 closed enhancement (wontfix)

[Patch] Throw exception if user attempts to remove a layer that is already removed.

Reported by: michael2402 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: gsoc-core Cc: Don-vip, bastiK, stoecker

Description

Adds an exception that is thrown when you attempt to remove a layer inside the layer-removed listener that is already removed. We allow other layers to be removed during the remove listener (many plugins use this)

For backward compatibility, this is ignored in MapView#removeLayer

Should prevent #12892 from happening.

Attachments (1)

patch-layer-manager-track-removed-layers.patch (6.2 KB ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by stoecker, 8 years ago

I'm not sure I like this.

a) It's an obvious programming bug on the using side and easy to detect.
b) The code adds unnecessary complexity.

I'd vote to wait if there is any real need for this.

comment:2 by michael2402, 8 years ago

I'm also not a real fan of this.

With the new API it is a real error to remove the layer during the layer remove listener, so this is the only way to ignore it in compatibility mode.

comment:3 by michael2402, 8 years ago

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.