Skip to content

Commit

Permalink
Merge pull request #3493 from pypeclub/bugfix/OP-3561_traypublisher-s…
Browse files Browse the repository at this point in the history
…wap-between-view-name-change

TrayPublisher: Keep use instance label in list view
  • Loading branch information
iLLiCiTiT committed Jul 12, 2022
2 parents 84f655e + 6936f83 commit b3f64b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions openpype/tools/publisher/widgets/list_view_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, instance, parent):

active_checkbox.stateChanged.connect(self._on_active_change)

self._subset_name_label = subset_name_label
self._instance_label_widget = subset_name_label
self._active_checkbox = active_checkbox

self._has_valid_context = None
Expand All @@ -146,8 +146,8 @@ def _set_valid_property(self, valid):
state = ""
if not valid:
state = "invalid"
self._subset_name_label.setProperty("state", state)
self._subset_name_label.style().polish(self._subset_name_label)
self._instance_label_widget.setProperty("state", state)
self._instance_label_widget.style().polish(self._instance_label_widget)

def is_active(self):
"""Instance is activated."""
Expand Down Expand Up @@ -176,9 +176,9 @@ def update_instance(self, instance):
def update_instance_values(self):
"""Update instance data propagated to widgets."""
# Check subset name
subset_name = self.instance["subset"]
if subset_name != self._subset_name_label.text():
self._subset_name_label.setText(subset_name)
label = self.instance.label
if label != self._instance_label_widget.text():
self._instance_label_widget.setText(label)
# Check active state
self.set_active(self.instance["active"])
# Check valid states
Expand Down

0 comments on commit b3f64b5

Please sign in to comment.