labscript-suite / runmanager

𝗿𝘂𝗻𝗺𝗮𝗻𝗮𝗴𝗲𝗿 is an intuitive graphical interface for controlling 𝘭𝘢𝘣𝘴𝘤𝘳𝘪𝘱𝘵 𝘴𝘶𝘪𝘵𝘦 experiments. Includes multi-dimensional parameter scans and a remote programming interface for automation.
http://labscriptsuite.org
Other
3 stars 45 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>>