Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin: Prevent SystemTree from losing selection
......................................................................


webadmin: Prevent SystemTree from losing selection

There are basically two listeners for SystemTreeModel's
ItemsChanged event:

  (1) SystemTreeModelProvider.updateDataProvider
      - actual listener registration code is in
        DataBoundTabModelProvider.onCommonModelChange
      - this method selects root "System" node

  (2) SystemTree.addModelListeners
      - this method de-selects last selected node

Upon WebAdmin startup, (2) gets executed after (1) which
causes SystemTree to lose selection.

As a result, code calling SystemTreeModel.getSelectedItem
might blow up on NullPointerException.

This patch ensures SystemTree doesn't lose selection upon
SystemTreeModel's ItemsChanged event.

Change-Id: Ie5c099dd6bbce0f721e7ed2430ecb7124b9241ca
Signed-off-by: Vojtech Szocs <[email protected]>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tree/SystemTree.java
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Vojtech Szocs: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5c099dd6bbce0f721e7ed2430ecb7124b9241ca
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to