Opened 12 years ago

Closed 12 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 12 years ago.

Download all attachments as: .zip

Change History (2)

by jng, 12 years ago

Attachment: 2189.patch added

comment:1 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r7230) and 2.4 (r7232)

Note: See TracTickets for help on using tickets.