Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Put back vNIC listener after flush
......................................................................

webadmin: Put back vNIC listener after flush

Since pressing the "Advanced Mode" button in the Add VM dialog causes
widgets to flush (without closing the dialog), the vNIC widget
listener should be put back to still be able to handle events after
the button was pressed.

Change-Id: I7cc1583bd629e0cf217d7e941f6fd018032831fb
Bug-Url: https://bugzilla.redhat.com/1029339
Signed-off-by: Lior Vernia <[email protected]>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/profile/ProfilesInstanceTypeEditor.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/42/21242/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/profile/ProfilesInstanceTypeEditor.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/profile/ProfilesInstanceTypeEditor.java
index afd4804..0ef1443 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/profile/ProfilesInstanceTypeEditor.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/profile/ProfilesInstanceTypeEditor.java
@@ -107,8 +107,10 @@
 
     @Override
     public ListModel flush() {
-        vnicsModel.getItemsChangedEvent().removeListener(vnicsChangedListener);
+        
vnicsModel.getItemsChangedEvent().removeListener(vnicsChangedListener); // 
remove to avoid calling init() here
         flush(vnicsModel);
+        vnicsModel.getItemsChangedEvent().addListener(vnicsChangedListener); 
// put back in case dialog wasn't closed
+
         return driver.flush();
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cc1583bd629e0cf217d7e941f6fd018032831fb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to