Closed Bug 392653 Opened 17 years ago Closed 17 years ago

tree.xml: _reorderColumn should not fail in cases where the move and before columns are the same.

Categories

(Toolkit :: XUL Widgets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

In mailnews we have a case (bug 384712) where we try and reorder the columns of the thread pane window (a tree) on startup if the current ui version requires it. Unfortunately this currently fails because the columns are already in the correct order. I've found that _reorderColumn in tree.xml fails when effectively called as _reorderColumn(a, a, <boolean>) with the error: TypeError: col has no properties We should be checking that the columns aren't the same and allow the function to end without failure in this instance.
Attachment #277143 - Flags: review?(enndeakin)
Comment on attachment 277143 [details] [diff] [review] Allow move and before columns to be the same >Index: toolkit/content/widgets/tree.xml > <parameter name="aBefore"/> > <body><![CDATA[ > this._ensureColumnOrder(); >- >+ In general, don't make whitespace changes. > cols[i].ordinal += 2; >- } else { >+ } else if (aColBefore.ordinal != I think this would be clearer and would mirror the earlier condition better if > was used instead of !=
Attachment #277143 - Flags: review?(enndeakin) → review+
Patch checked in with comment addressed -> fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: