Opened 9 years ago
Closed 9 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)
Change History (4)
by , 9 years ago
Attachment: | patch-layer-manager-track-removed-layers.patch added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 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 , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.