Vojtech Szocs has posted comments on this change.

Change subject: userportal,webadmin: ensureColumnPresentFix
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/32831/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java:

Line 224:      * This method also sets the column width in case the column 
needs to be added.
Line 225:      */
Line 226:     public void ensureColumnPresent(Column<T, ?> column, String 
headerText, boolean present, String width) {
Line 227:         if (present) {
Line 228:             if (getColumnIndex(column) == -1) {
I guess the condition can now be unified like so:

 if (present && getColumnIndex(column) == -1)

We could also improve readability a bit here, up to your consideration:

 boolean columnAttached = getColumnIndex(column) != -1;
 
 if (!columnAttached && present) { ... }
 else if (columnAttached && !present) { ... }

Also, please verify this patch in WebAdmin "Events" main tab, clicking on 
"Basic" vs. "Advanced" radio buttons (columns should not jump but retain their 
logical position).
Line 229:                 // Add the column
Line 230:                 if (width == null) {
Line 231:                     addColumnWithHtmlHeader(column, headerText);
Line 232:                 } else {


-- 
To view, visit http://gerrit.ovirt.org/32831
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I82f725fd98a1690c16fd01a40fa1c05a27d3237e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to