Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#320 closed defect (fixed)

Two Layers with the same name could be created in the Redline Panel

Reported by: tenswell Owned by: madair
Priority: P3 Milestone: Future
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: Christine, Bao, arthur.liu@… Browser: All
External ID: 1276516 Operating System: All
state: Committed

Description

1.Open a Flexible Web Layout in browser. 2.Open the Redline Panel. 3.Click New button-------------> click OK 4.Click New button-------------> click OK 5.Click New button-------------> click OK 6.Select Digitizing layer 1 in the drop-down list ------------------------->click remove. 7.Click New button-------------> click OK

Result: In the Layer List there are two "Digitizing layer 3".

Expected Result: The name should be "Digitizing layer 1" or "Digitizing layer 4", and the name should be unique.

Attachments (2)

Same named layers.PNG (19.7 KB ) - added by tenswell 14 years ago.
RedlineLayerName.patch (1.3 KB ) - added by christinebao 14 years ago.

Download all attachments as: .zip

Change History (7)

by tenswell, 14 years ago

Attachment: Same named layers.PNG added

comment:1 by christinebao, 14 years ago

The layer names are not for logic control: when add/rename layer name, they can be duplicated and it doesn't affect the functions. Generally the layer name is just for organizing digitalizations, user can put any reasonable name even if (s)he choose duplicated names.

However it's not good for the default new layer name duplicated with those existing, so SWD and QA agree to fix "New Layer" function in this way: the default new layer name should be unique - there is no furthur requirement about how to define the name, for example, if existing name is "Digitizing layer 1", "Digitizing layer 2", the default name could be "Digitizing layer 0" or "Digitizing layer 3", as far as it's different from the existing.

by christinebao, 14 years ago

Attachment: RedlineLayerName.patch added

comment:2 by christinebao, 14 years ago

Cc: Christine Bao arthur.liu@… added

Attach patch http://trac.osgeo.org/fusion/attachment/ticket/320/RedlineLayerName.patch for fixing.

Arthur, would you please review the patch? Thank you.

comment:3 by liuar, 14 years ago

Reviewed. Please submit the code.

[Just a little suggestion: Can we use recursion to make the logic more clear.]

comment:4 by christinebao, 14 years ago

Resolution: fixed
Status: newclosed

Commit the patch to fix this ticket.

comment:5 by christinebao, 14 years ago

state: NewCommitted
Note: See TracTickets for help on using tickets.