Closed philipstarkey closed 10 years ago
Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Actually the reason they are sorted by name is because I had them inserted in that order:
#!python
globals = runmanager.get_globals({self.group_name: self.globals_file})[self.group_name]
globals_items = list(globals.items())
globals_items.sort() # Ensure globals ordered alphabetically at load time
But now I've changed it so that the sorting is done after insertion, with:
#!python
# Sort by name:
self.ui.treeView_globals.sortByColumn(self.GLOBALS_COL_NAME, QtCore.Qt.AscendingOrder)
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Resolves Issue #21: Globals are sorted by "Delete" rather than "Name"
→ \<\<cset 9a97eee969da0d138f300dc462adff4383c81f29>>
Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).
In qt runmanager, by default, the lists of globals appear to be sorted by the "Delete" column, which makes no sense. In practice this reverts to sorting by "Name" since this is the next column across and the first which contains different values.
It would make more sense to have the arrow indicating which column is being sorted to be above this column rather than the first.