File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,11 @@ RowLayout {
9191 statusBar .message = msg
9292 statusBarTimer .interval = duration !== undefined ? duration : root .interval
9393 statusBarTimer .restart ()
94+ MeshroomApp .forceUIUpdate ()
9495 }
9596 }
9697
9798 function showMessage (msg , status = undefined , duration = undefined ) {
9899 statusBar .showMessage (msg, status, duration)
99- MeshroomApp .forceUIUpdate ()
100100 }
101101}
Original file line number Diff line number Diff line change @@ -435,20 +435,21 @@ def onCameraInitChanged(self):
435435
436436 @Slot ()
437437 def reloadPlugins (self ):
438+ """ Launch _reloadPlugins in a worker thread to avoid blocking the ui. """
439+ self ._workerThreads .apply_async (func = self ._reloadPlugins , args = ())
440+
441+ def _reloadPlugins (self ):
438442 """
439443 Reload all the NodePlugins from all the registered plugins.
440444 The nodes in the graph will be updated to match the changes in the description, if
441445 there was any.
442446 """
443- def _reloadPlugins (reconstruction ):
444- nodeTypes : list [str ] = []
445- for plugin in meshroom .core .pluginManager .getPlugins ().values ():
446- for node in plugin .nodes .values ():
447- if node .reload ():
448- nodeTypes .append (node .nodeDescriptor .__name__ )
449- reconstruction .pluginsReloaded .emit (nodeTypes )
450-
451- self ._workerThreads .apply_async (func = lambda : _reloadPlugins (self ), args = ())
447+ nodeTypes : list [str ] = []
448+ for plugin in meshroom .core .pluginManager .getPlugins ().values ():
449+ for node in plugin .nodes .values ():
450+ if node .reload ():
451+ nodeTypes .append (node .nodeDescriptor .__name__ )
452+ self .pluginsReloaded .emit (nodeTypes )
452453
453454 @Slot (list )
454455 def _onPluginsReloaded (self , nodeTypes : list ):
You can’t perform that action at this time.
0 commit comments