Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions spikeinterface_gui/backend_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,23 @@ def create_main_layout(self):
# make visible the first of each zone
self.docks[view_name0].raise_()

def showEvent(self, event):
super().showEvent(event)
if not hasattr(self, '_splitters_equalized'):
self._splitters_equalized = True
# On macOS, the native Cocoa window system performs a layout pass after
# Qt's showEvent, overwriting any sizes set synchronously. A deferred
# call via QTimer.singleShot ensures resizeDocks runs after both Qt and
# the macOS window server have finished laying out the docks.
QT.QTimer.singleShot(0, self._equalize_dock_sizes)

def _equalize_dock_sizes(self):
all_docks = [dock for dock in self.docks.values() if dock.isVisible()]
if all_docks:
size_weight = 1
self.resizeDocks(all_docks, [size_weight] * len(all_docks), QT.Qt.Horizontal)
self.resizeDocks(all_docks, [size_weight] * len(all_docks), QT.Qt.Vertical)

def make_half_layout(self, widgets_zone, left_or_right):
"""
Function contains the logic for the greedy layout. Given the 2x2 box of zones
Expand Down
2 changes: 1 addition & 1 deletion spikeinterface_gui/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def set_visible_unit_ids(self, visible_unit_ids):

def get_visible_unit_ids(self):
"""Get list of visible unit_ids"""
return self._visible_unit_ids
return list(self._visible_unit_ids)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was to fix #264 unit visibility propagation issue. I should have restored this line since these 2 issues are independent :)


def get_visible_unit_indices(self):
"""Get list of indices of visible units"""
Expand Down
Loading