labscript-suite-temp-2 / runmanager

runmanager is a graphical user interface (GUI) used to aid the compilation of labscript experiment scripts into hardware instructions to be executed on the hardware. Experiment parameters can be adjusted in the GUI, and lists of parameters can be used to create sequences of experiments, and scan over complex parameter spaces.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Globals are sorted by "Delete" rather than "Name" #21

Closed philipstarkey closed 10 years ago

philipstarkey commented 10 years ago

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.

philipstarkey commented 10 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


philipstarkey commented 10 years ago

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)
philipstarkey commented 10 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Resolves Issue #21: Globals are sorted by "Delete" rather than "Name"

→ \<\<cset 9a97eee969da0d138f300dc462adff4383c81f29>>