Compare commits
No commits in common. "dd93440146bb994d456f74ebaba30f4c0bff639e" and "199fb43f04a179dd2e3ec29d448a4d05d29e4078" have entirely different histories.
dd93440146
...
199fb43f04
@ -43,11 +43,10 @@ EQ_FRAMES = [
|
||||
|
||||
class NumericTableItem(QTableWidgetItem):
|
||||
def __lt__(self, other):
|
||||
_, self_data = self.data(Qt.ItemDataRole.UserRole) or (False, {})
|
||||
_, other_data = other.data(Qt.ItemDataRole.UserRole) or (False, {})
|
||||
self_num = (self_data or {}).get("track_num", 0) or 0
|
||||
other_num = (other_data or {}).get("track_num", 0) or 0
|
||||
return self_num < other_num
|
||||
try:
|
||||
return int(self.text()) < int(other.text())
|
||||
except ValueError:
|
||||
return super().__lt__(other)
|
||||
|
||||
|
||||
class LibraryTab(QWidget):
|
||||
@ -104,7 +103,6 @@ class LibraryTab(QWidget):
|
||||
self.library_table.setSelectionMode(QTableWidget.SelectionMode.ExtendedSelection)
|
||||
self.library_table.setEditTriggers(QTableWidget.EditTrigger.NoEditTriggers)
|
||||
self.library_table.setAlternatingRowColors(True)
|
||||
self.library_table.verticalHeader().setVisible(False)
|
||||
self.library_table.setSortingEnabled(True)
|
||||
self.library_table.cellDoubleClicked.connect(self._on_table_double_clicked)
|
||||
self.library_table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user