From e547967e1be58091aedc3fff4d4a6f3d1709f205 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 16 Jun 2020 18:47:57 +0200 Subject: [PATCH] reversed instance_toggled new/old value --- pype/tools/pyblish_pype/control.py | 4 ++-- pype/tools/pyblish_pype/window.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pype/tools/pyblish_pype/control.py b/pype/tools/pyblish_pype/control.py index 21cf660e63..aa39663182 100644 --- a/pype/tools/pyblish_pype/control.py +++ b/pype/tools/pyblish_pype/control.py @@ -416,14 +416,14 @@ class Controller(QtCore.QObject): for plugin in self.plugins: del(plugin) - def _on_instance_toggled(self, instance, new_value, old_value): + def _on_instance_toggled(self, instance, old_value, new_value): callbacks = pyblish.api.registered_callbacks().get("instanceToggled") if not callbacks: return for callback in callbacks: try: - callback(instance, new_value, old_value) + callback(instance, old_value, new_value) except Exception: print( "Callback for `instanceToggled` crashed. {}".format( diff --git a/pype/tools/pyblish_pype/window.py b/pype/tools/pyblish_pype/window.py index 0c914a0c4b..5d22e5ac8f 100644 --- a/pype/tools/pyblish_pype/window.py +++ b/pype/tools/pyblish_pype/window.py @@ -554,7 +554,7 @@ class Window(QtWidgets.QDialog): instance_item.setData(state, QtCore.Qt.CheckStateRole) self.controller.instance_toggled.emit( - instance_item.instance, state, current_state + instance_item.instance, current_state, state ) self.update_compatibility()