Skip to content

Commit

Permalink
Merge pull request #165 from wpfff/fixlabels
Browse files Browse the repository at this point in the history
In data selection widget, only display label (not also name)
  • Loading branch information
jenshnielsen committed Dec 4, 2020
2 parents e0b3995 + cbaa9d4 commit 98aa8ab
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions plottr/gui/data_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ def __init__(self, parent: Optional[QtWidgets.QWidget] = None,

def _makeItem(self, name: str) -> QtWidgets.QTreeWidgetItem:
shape = self._dataShapes.get(name, tuple())
label = f"{name} [{self._dataStructure.label(name)}]"
deps = "("
for i, d in enumerate(self._dataStructure.axes(name)):
if i > 0:
deps += ", "
axlabel = self._dataStructure.label(d)
deps += f"{d} [{axlabel}]"
deps += ")"
label = f"{self._dataStructure.label(name)}"
axlabels = [str(self._dataStructure.label(d)) for d in
self._dataStructure.axes(name)]
deps = ", ".join(axlabels)

return QtWidgets.QTreeWidgetItem([
label, deps, str(shape)
Expand Down

0 comments on commit 98aa8ab

Please sign in to comment.