Workaround for backup dialog modeless behaviour
Since now it's modeless, user could have already it opened but we have to destroy it and recreate when closed for vm list being refreshed (at least for now)
This commit is contained in:
parent
531b9daad2
commit
971ec085ee
@ -336,6 +336,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
||||
self.sort_by_column = "Type"
|
||||
self.sort_order = QtCore.Qt.AscendingOrder
|
||||
|
||||
self.backup_window = None
|
||||
|
||||
self.vms_list = []
|
||||
self.vms_in_table = {}
|
||||
|
||||
@ -1047,9 +1049,17 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
||||
# noinspection PyArgumentList
|
||||
@QtCore.pyqtSlot(name='on_action_backup_triggered')
|
||||
def action_backup_triggered(self):
|
||||
backup_window = backup.BackupVMsWindow(self.qt_app, self.qubes_app,
|
||||
self.dispatcher)
|
||||
backup_window.show()
|
||||
if not self.backup_window:
|
||||
self.backup_window = backup.BackupVMsWindow(self.qt_app, self.qubes_app,
|
||||
self.dispatcher, self)
|
||||
self.backup_window.finished.connect(self._backup_finished)
|
||||
|
||||
self.backup_window.show()
|
||||
self.backup_window.activateWindow()
|
||||
|
||||
def _backup_finished(self):
|
||||
self.backup_window.deleteLater()
|
||||
self.backup_window = None
|
||||
|
||||
# noinspection PyArgumentList
|
||||
@QtCore.pyqtSlot(name='on_action_exit_triggered')
|
||||
|
Loading…
Reference in New Issue
Block a user