Skip to content

Commit

Permalink
fix: remove disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrgsp committed Feb 29, 2024
1 parent 4d4b0e0 commit df686c3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/napari_micromanager/_gui_objects/_toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ def _show_dock_widget(self, key: str = "") -> None:
wdg = ScrollableWidget(self, title=key, widget=wdg)
dock_wdg = self._add_dock_widget(wdg, key, floating=floating, tabify=tabify)
self._connect_dock_widget(dock_wdg)
dock_wdg.destroyed.connect(self._disconnect_dock_widget)
self._dock_widgets[key] = dock_wdg

def _add_dock_widget(
Expand Down Expand Up @@ -240,13 +239,6 @@ def _connect_dock_widget(self, dock_wdg: QDockWidget) -> None:
dock_wdg.topLevelChanged.connect(self._save_layout)
dock_wdg.dockLocationChanged.connect(self._save_layout)

def _disconnect_dock_widget(self) -> None:
"""Disconnect the dock widget from the main window."""
dock_wdg = cast(QDockWidget, self.sender())
dock_wdg.visibilityChanged.disconnect(self._save_layout)
dock_wdg.topLevelChanged.disconnect(self._save_layout)
dock_wdg.dockLocationChanged.disconnect(self._save_layout)

def _on_dock_widget_changed(self) -> None:
"""Start a saving threrad to save the layout if the thread is not running."""

Expand Down

0 comments on commit df686c3

Please sign in to comment.