mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
createvm: Only check network selection on final page
Otherwise early 'change' signals can give inconsistent behavior WRT default 'advanced' expander state Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -664,7 +664,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
|
||||
self._netlist = vmmNetworkList(self.conn, self.builder, self.topwin)
|
||||
self.widget("netdev-ui-align").add(self._netlist.top_box)
|
||||
self._netlist.connect("changed", self._netdev_changed)
|
||||
self._netlist.reset_state()
|
||||
|
||||
def _conn_state_changed(self, conn):
|
||||
@@ -980,7 +979,10 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
self.widget("summary-cpu").set_text(cpu)
|
||||
self._populate_summary_storage()
|
||||
|
||||
self._netdev_changed(None)
|
||||
ignore, nsource, ignore = self._netlist.get_network_selection()
|
||||
expand = not nsource
|
||||
if expand:
|
||||
self.widget("advanced-expander").set_expanded(True)
|
||||
|
||||
|
||||
################################
|
||||
@@ -1247,13 +1249,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
"for name=%s", newname, exc_info=True)
|
||||
|
||||
|
||||
def _netdev_changed(self, ignore):
|
||||
ignore, nsource, ignore = self._netlist.get_network_selection()
|
||||
expand = not nsource
|
||||
if expand:
|
||||
self.widget("advanced-expander").set_expanded(True)
|
||||
|
||||
|
||||
# Enable/Disable container source URL entry on checkbox click
|
||||
def _container_source_toggle(self, ignore):
|
||||
enable_src = self.widget("install-oscontainer-bootstrap").get_active()
|
||||
|
||||
@@ -352,6 +352,7 @@ class vmmNetworkList(vmmGObjectUI):
|
||||
netlist.set_active_iter(row.iter)
|
||||
return
|
||||
|
||||
print(default_idx)
|
||||
netlist.set_active(default_idx)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user