Skip to content

Commit b589d5d

Browse files
committed
Fix non-sorted tables
1 parent ba7eb77 commit b589d5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

activity_browser/ui/widgets/item_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, parent=None, dataframe=None):
2323
self.root: ABBranchItem = self.branchItemClass("root") # root ABItem for the object tree
2424
self.grouped_columns: [int] = list() # list of columns that are currently being grouped
2525
self.filtered_columns: [int] = set() # set of all columns that have filters applied
26-
self.sort_column: int = 0 # column that is currently sorted
26+
self.sort_column: int = -1 # column that is currently sorted
2727
self.sort_order: Qt.SortOrder = Qt.SortOrder.AscendingOrder
2828
self._query = "" # Pandas query currently applied to the dataframe
2929

@@ -196,7 +196,7 @@ def endResetModel(self):
196196
else:
197197
df = self.dataframe.copy()
198198

199-
if not self.sort_column > len(self.columns()) - 1:
199+
if not self.sort_column > len(self.columns()) - 1 and self.sort_column != -1:
200200
# apply the sorting
201201
df.sort_values(
202202
by=self.columns()[self.sort_column],

0 commit comments

Comments
 (0)