Merge remote-tracking branch 'origin/pr/292'

* origin/pr/292:
  Avoid spurious warnings when setting NetVM
This commit is contained in:
Marek Marczykowski-Górecki 2021-05-30 00:56:27 +02:00
commit d9c28ef65a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -629,7 +629,14 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
self.warn_too_much_mem_label.setVisible(True) self.warn_too_much_mem_label.setVisible(True)
def check_warn_templatenetvm(self): def check_warn_templatenetvm(self):
if self.vm.klass == 'TemplateVM': if self.vm.klass != 'TemplateVM':
return
current_netvm = self.netVM.currentData()
if current_netvm is None:
return
if current_netvm != qubesadmin.DEFAULT:
QtWidgets.QMessageBox.warning( QtWidgets.QMessageBox.warning(
self, self,
self.tr("Warning!"), self.tr("Warning!"),