397 Private method to update an items end line based on its children. |
397 Private method to update an items end line based on its children. |
398 |
398 |
399 @param itm reference to the item to be updated |
399 @param itm reference to the item to be updated |
400 @type QTreeWidgetItem |
400 @type QTreeWidgetItem |
401 """ |
401 """ |
402 if itm.childCount(): |
402 endLine = ( |
403 endLine = max( |
403 max(itm.child(index).data(0, self.EndLineRole) |
404 itm.child(index).data(0, self.EndLineRole) |
404 for index in range(itm.childCount())) |
405 for index in range(itm.childCount()) |
405 if itm.childCount() else |
406 ) |
406 itm.data(0, self.StartLineRole) |
407 else: |
407 ) |
408 endLine = itm.data(0, self.StartLineRole) |
|
409 itm.setData(0, self.EndLineRole, endLine) |
408 itm.setData(0, self.EndLineRole, endLine) |
410 |
409 |
411 def __createCodeInfo(self, co): |
410 def __createCodeInfo(self, co): |
412 """ |
411 """ |
413 Private method to create a dictionary containing the code info data. |
412 Private method to create a dictionary containing the code info data. |