From b2b4c031c143a938b4aa6c0674827a7ca87d7dc9 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 17 Apr 2019 09:54:08 +0200 Subject: [PATCH] component item can coverup component widget changes --- .../widgets/widget_component_item.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pype/tools/standalonepublish/widgets/widget_component_item.py b/pype/tools/standalonepublish/widgets/widget_component_item.py index 1236a439c0..dcf66a9c21 100644 --- a/pype/tools/standalonepublish/widgets/widget_component_item.py +++ b/pype/tools/standalonepublish/widgets/widget_component_item.py @@ -5,11 +5,25 @@ from . import ComponentWidget class ComponentItem(QtWidgets.QTreeWidgetItem): def __init__(self, parent, data): super().__init__(parent) + self.parent_widget = parent self.in_data = data - self._widget = ComponentWidget(self) - self._widget.set_context(data) + def set_context(self): + self._widget = ComponentWidget(self) + self._widget.set_context(self.in_data) self.treeWidget().setItemWidget(self, 0, self._widget) + def is_thumbnail(self): + return self._widget.thumbnail.checked + + def change_thumbnail(self, hover=True): + self._widget.thumbnail.change_checked(hover) + + def is_preview(self): + return self._widget.preview.checked + + def change_preview(self, hover=True): + self._widget.preview.change_checked(hover) + def double_clicked(*args): pass