pass just plugin label on "publish.process.plugin.changed" topic instead of plugin

This commit is contained in:
Jakub Trllo 2022-10-04 18:36:39 +02:00
parent c12f938be0
commit 8aaa53cc66
2 changed files with 5 additions and 7 deletions

View file

@ -874,9 +874,12 @@ class PublisherController:
self._publish_report.add_plugin_iter(plugin, self._publish_context)
# Trigger callback that new plugin is going to be processed
plugin_label = plugin.__name__
if hasattr(plugin, "label") and plugin.label:
plugin_label = plugin.label
self._emit_event(
"publish.process.plugin.changed",
{"plugin": plugin}
{"plugin_label": plugin_label}
)
# Plugin is instance plugin

View file

@ -329,13 +329,8 @@ class PublishFrame(QtWidgets.QWidget):
def _on_plugin_change(self, event):
"""Change plugin label when instance is going to be processed."""
plugin = event["plugin"]
plugin_name = plugin.__name__
if hasattr(plugin, "label") and plugin.label:
plugin_name = plugin.label
self._progress_widget.setValue(self.controller.publish_progress)
self._plugin_label.setText(plugin_name)
self._plugin_label.setText(event["plugin_label"])
QtWidgets.QApplication.processEvents()
def _on_publish_stop(self):