From 1f4cb49452803e7e0b3a5e9c3b8c2ffae870912d Mon Sep 17 00:00:00 2001 From: Simon Bourassa Blouin Date: Mon, 9 Mar 2020 14:33:39 -0400 Subject: [PATCH 1/2] Fix tree item expand indicator not displayed. Make sure to update the expand indicator after both item tasks and item children have been added to the tree. --- .../publish_tree_widget/publish_tree_widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py b/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py index ca28313f..8f04afac 100644 --- a/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py +++ b/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py @@ -120,13 +120,13 @@ def _build_item_tree_r(self, item, checked, level, tree_parent): ui_task = TreeNodeTask(task, ui_item) self.__created_items.append(ui_task) - # ensure the expand indicator is shown/hidden depending on child - # visibility - ui_item.update_expand_indicator() - for child in item.children: self._build_item_tree_r(child, checked, level + 1, ui_item) + # ensure the expand indicator is shown/hidden depending on child + # visibility + ui_item.update_expand_indicator() + # lastly, handle the item level check state. # if the item has been marked as checked=False # uncheck it now (which will affect all children) From 04e2ee7e750558bef39e5942b8eb9836e572f142 Mon Sep 17 00:00:00 2001 From: Simon Bourassa Blouin Date: Mon, 9 Mar 2020 14:41:27 -0400 Subject: [PATCH 2/2] Remove spaces on empty line. --- .../publish_tree_widget/publish_tree_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py b/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py index 8f04afac..54e9870d 100644 --- a/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py +++ b/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py @@ -126,7 +126,7 @@ def _build_item_tree_r(self, item, checked, level, tree_parent): # ensure the expand indicator is shown/hidden depending on child # visibility ui_item.update_expand_indicator() - + # lastly, handle the item level check state. # if the item has been marked as checked=False # uncheck it now (which will affect all children)