Skip to content

Fix order of units in mergeview#245

Open
alejoe91 wants to merge 1 commit intoSpikeInterface:mainfrom
alejoe91:fix-order-mergeview
Open

Fix order of units in mergeview#245
alejoe91 wants to merge 1 commit intoSpikeInterface:mainfrom
alejoe91:fix-order-mergeview

Conversation

@alejoe91
Copy link
Member

Fixes #226

@alejoe91 alejoe91 added this to the 0.13.0 milestone Mar 6, 2026
other_data = other.data(QT.Qt.ItemDataRole.UserRole)
if self_data is not None and other_data is not None:
try:
return float(self_data) < float(other_data)
Copy link
Member

Choose a reason for hiding this comment

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

Why not other_ind = self.unit_ids.index(other.text()) like in CustomItemUnitID ?

@chrishalcrow
Copy link
Member

@h-mayorquin suggested using natsort: https://github.com/SethMMorton/natsort
Looks pretty good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

merge view order of units

3 participants