Opened 5 years ago

Closed 5 years ago

#2189 closed defect (fixed)

MgLayerCollection::Remove returns true even for non-existent layers

Reported by: jng Owned by:
Priority: low Milestone:
Component: General Version: 2.4.0
Severity: trivial Keywords:
Cc: External ID:

Description

If you call Remove() on a MgLayerCollection? passing in a layer that doesn't belong to the collection, true is returned.

This is inconsistent with the behaviour of other collection classes. where the contract is Remove() returns true if the layer was removed successfully.

With the MgLayerCollection?, it's even worse as it will then detach this non-existent layer and track it's changes even though it doesn't belong to the collection

Attached is a patch to fix this behavior

Attachments (1)

2189.patch (522 bytes) - added by jng 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by jng

Attachment: 2189.patch added

comment:1 Changed 5 years ago by jng

Resolution: fixed
Status: newclosed

Fixed trunk (r7230) and 2.4 (r7232)

Note: See TracTickets for help on using tickets.