mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-27 20:28:25 +08:00
moninj: set parent to main window on widget delete
This commit is contained in:
parent
f1e8b8772a
commit
fdb0668c8a
@ -861,9 +861,10 @@ class _MonInjDock(QDockWidgetCloseDetect):
|
||||
|
||||
def delete_widget(self, index, checked):
|
||||
widget = self.flow.itemAt(index).widget()
|
||||
widget.hide()
|
||||
self.manager.dm.setup_monitoring(False, widget)
|
||||
self.flow.layout.takeAt(index)
|
||||
widget.setParent(self.manager.main_window)
|
||||
widget.hide()
|
||||
|
||||
def add_channels(self):
|
||||
channels = self.channel_dialog.channels
|
||||
@ -948,7 +949,7 @@ class MonInj:
|
||||
del self.docks[name]
|
||||
self.update_closable()
|
||||
dock.delete_all_widgets()
|
||||
dock.hide() # dock may be parent, only delete on exit
|
||||
dock.deleteLater()
|
||||
|
||||
def update_closable(self):
|
||||
flags = (QtWidgets.QDockWidget.DockWidgetMovable |
|
||||
|
Loading…
Reference in New Issue
Block a user