Opened 14 years ago

Closed 10 years ago

#1267 closed defect (fixed)

MgLayerBase::SetLayerDefinition should not change layer name

Reported by: tomfukushima Owned by: jng
Priority: medium Milestone:
Component: Web API Version: 2.1.0
Severity: major Keywords:
Cc: External ID: 1289652.01

Description

When working with a MgLayerBase object, by default the layer gets a name derived from the resource ID of the layer definition. This is good because a name other than "" is good and resource ID is as good as anything for a default. The app developer can then use SetName to change the name to something more to their liking. However, when MgLayerBase::SetLayerDefinition is called, the layer name will be reset to the resource ID of the layer definition. We need to remove this side effect for the cases when the developer has actually set the Name to something other than the default.

Will need to check all code where SetLayerDefinition is used to make sure that this functionality is not relied upon.

If this is fixed it will cause a change in behavior to the API so a note must be added to the release notes.

Attachments (1)

1267.patch (1017 bytes ) - added by jng 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by tomfukushima, 14 years ago

Severity: trivialmajor

comment:2 by tomfukushima, 14 years ago

This problem was found and reported by Reva.

comment:3 by jng, 11 years ago

Milestone: 2.5

comment:4 by jng, 11 years ago

Milestone: 2.52.6

by jng, 10 years ago

Attachment: 1267.patch added

comment:5 by jng, 10 years ago

Milestone: 2.6
Owner: set to jng

Patch attached.

No other code uses this method. This patch is good to apply after 2.6

comment:6 by jng, 10 years ago

Resolution: fixed
Status: newclosed

Fixed r8171

Note: See TracTickets for help on using tickets.