Skip to content

Commit

Permalink
Merge pull request bitcraze#416 from victorhook/issue_404
Browse files Browse the repository at this point in the history
Enabled sorting of some log-tags regarding bitcraze#404
  • Loading branch information
krichardsson authored Jul 27, 2020
2 parents a483f7d + d915e26 commit 37592f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/cfclient/ui/tabs/LogBlockTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def __init__(self, view, parent=None):
def add_block(self, block, connected_ts):
self._nodes.append(LogBlockItem(block, self, connected_ts))
self.layoutChanged.emit()
self._nodes.sort(key=lambda conf: conf.name.lower())

def refresh(self):
"""Force a refresh of the view though the model"""
Expand Down
3 changes: 2 additions & 1 deletion src/cfclient/ui/tabs/LogTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def __init__(self, tabWidget, helper, *args):

# Init the tree widget
self.logTree.setHeaderLabels(['Name', 'ID', 'Unpack', 'Storage'])
self.logTree.setSortingEnabled(True)
self.logTree.sortItems(0, Qt.AscendingOrder)

self.cf.connected.add_callback(self.connectedSignal.emit)
self.connectedSignal.connect(self.connected)
Expand Down Expand Up @@ -90,4 +92,3 @@ def connected(self, linkURI):
groupItem.addChild(item)

self.logTree.addTopLevelItem(groupItem)
self.logTree.expandItem(groupItem)
1 change: 0 additions & 1 deletion src/cfclient/ui/tabs/ParamTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def __init__(self, tabWidget, helper, *args):

def _connected(self, link_uri):
self._model.set_toc(self.cf.param.toc.toc, self.helper.cf)
self.paramTree.expandAll()

def _disconnected(self, link_uri):
self._model.beginResetModel()
Expand Down

0 comments on commit 37592f5

Please sign in to comment.