reversed instance_toggled new/old value

This commit is contained in:
iLLiCiTiT 2020-06-16 18:47:57 +02:00
parent 805ca00991
commit e547967e1b
2 changed files with 3 additions and 3 deletions

View file

@ -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(

View file

@ -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()