Alexander Wels has uploaded a new change for review. Change subject: userportal,webadmin: ensureColumnPresentFix ......................................................................
userportal,webadmin: ensureColumnPresentFix - ensureColumnPresentFix would check if the column existed and then would remove it and add it back again. This would cause the index of the column to fluctuate and cause the width loading to fail. This patch fixes the issue. Change-Id: I82f725fd98a1690c16fd01a40fa1c05a27d3237e Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124546 Signed-off-by: Alexander Wels <[email protected]> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java 1 file changed, 7 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/31/32831/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java index 182a4fb..17bb407 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java @@ -225,16 +225,13 @@ */ public void ensureColumnPresent(Column<T, ?> column, String headerText, boolean present, String width) { if (present) { - // Remove the column first - if (getColumnIndex(column) != -1) { - removeColumn(column); - } - - // Re-add the column - if (width == null) { - addColumnWithHtmlHeader(column, headerText); - } else { - addColumnWithHtmlHeader(column, headerText, width); + if (getColumnIndex(column) == -1) { + // Add the column + if (width == null) { + addColumnWithHtmlHeader(column, headerText); + } else { + addColumnWithHtmlHeader(column, headerText, width); + } } } else if (!present && getColumnIndex(column) != -1) { // Remove the column -- To view, visit http://gerrit.ovirt.org/32831 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82f725fd98a1690c16fd01a40fa1c05a27d3237e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
