details: Avoid some misleading logging on rename

This commit is contained in:
Cole Robinson 2014-09-20 16:18:10 -04:00
parent 1bfdf0575f
commit f2ff378a9d

View File

@ -1910,10 +1910,6 @@ class vmmDetails(vmmGObjectUI):
kwargs = {}
hotplug_args = {}
if self.edited(EDIT_NAME):
# Renaming is pretty convoluted, so do it here synchronously
self.vm.define_name(self.widget("overview-name").get_text())
if self.edited(EDIT_TITLE):
kwargs["title"] = self.widget("overview-title").get_text()
hotplug_args["title"] = kwargs["title"]
@ -1949,6 +1945,15 @@ class vmmDetails(vmmGObjectUI):
idmap_list = None
kwargs["idmap_list"] = idmap_list
# This needs to be last
if self.edited(EDIT_NAME):
# Renaming is pretty convoluted, so do it here synchronously
self.vm.define_name(self.widget("overview-name").get_text())
if not kwargs and not hotplug_args:
# Saves some useless redefine attempts
return
return vmmAddHardware.change_config_helper(self.vm.define_overview,
kwargs, self.vm, self.err,
hotplug_args=hotplug_args)