Apply changes in global settings only when actual changes occurred
Fixed apply methods to check if there is an actual need to apply changes.
This commit is contained in:
		
							parent
							
								
									43520331f2
								
							
						
					
					
						commit
						91538f1aaf
					
				| @ -92,18 +92,29 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, | |||||||
| 
 | 
 | ||||||
|     def __apply_system_defaults__(self): |     def __apply_system_defaults__(self): | ||||||
|         # upatevm |         # upatevm | ||||||
|  |         if self.qvm_collection.updatevm != \ | ||||||
|  |                 self.update_vm_vmlist[self.update_vm_combo.currentIndex()]: | ||||||
|             self.qvm_collection.updatevm = \ |             self.qvm_collection.updatevm = \ | ||||||
|                 self.update_vm_vmlist[self.update_vm_combo.currentIndex()] |                 self.update_vm_vmlist[self.update_vm_combo.currentIndex()] | ||||||
| 
 | 
 | ||||||
|         # clockvm |         # clockvm | ||||||
|  |         if self.qvm_collection.clockvm !=\ | ||||||
|  |                 self.clock_vm_vmlist[self.clock_vm_combo.currentIndex()]: | ||||||
|             self.qvm_collection.clockvm = \ |             self.qvm_collection.clockvm = \ | ||||||
|                 self.clock_vm_vmlist[self.clock_vm_combo.currentIndex()] |                 self.clock_vm_vmlist[self.clock_vm_combo.currentIndex()] | ||||||
| 
 | 
 | ||||||
|         # default netvm |         # default netvm | ||||||
|  |         if self.qvm_collection.default_netvm !=\ | ||||||
|  |                 self.default_netvm_vmlist[ | ||||||
|  |                     self.default_netvm_combo.currentIndex()]: | ||||||
|             self.qvm_collection.default_netvm = \ |             self.qvm_collection.default_netvm = \ | ||||||
|             self.default_netvm_vmlist[self.default_netvm_combo.currentIndex()] |                 self.default_netvm_vmlist[ | ||||||
|  |                     self.default_netvm_combo.currentIndex()] | ||||||
| 
 | 
 | ||||||
|         # default template |         # default template | ||||||
|  |         if self.qvm_collection.default_template != \ | ||||||
|  |                 self.default_template_vmlist[ | ||||||
|  |                     self.default_template_combo.currentIndex()]: | ||||||
|             self.qvm_collection.default_template = \ |             self.qvm_collection.default_template = \ | ||||||
|                 self.default_template_vmlist[ |                 self.default_template_vmlist[ | ||||||
|                     self.default_template_combo.currentIndex()] |                     self.default_template_combo.currentIndex()] | ||||||
| @ -116,6 +127,8 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, | |||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
|     def __apply_kernel_defaults__(self): |     def __apply_kernel_defaults__(self): | ||||||
|  |         if self.qvm_collection.default_kernel != \ | ||||||
|  |                 self.kernels_list[self.default_kernel_combo.currentIndex()]: | ||||||
|             self.qvm_collection.default_kernel = \ |             self.qvm_collection.default_kernel = \ | ||||||
|                 self.kernels_list[self.default_kernel_combo.currentIndex()] |                 self.kernels_list[self.default_kernel_combo.currentIndex()] | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marta Marczykowska-Górecka
						Marta Marczykowska-Górecka