Skip to content
Permalink
Browse files

[processing] Avoid creation of gui components at startup

  • Loading branch information
nyalldawson committed Feb 27, 2019
1 parent 34a0650 commit 885f47d2af26cc804c87a8161ec880893455b0c2
Showing with 14 additions and 2 deletions.
  1. +14 −2 python/plugins/processing/ProcessingPlugin.py
@@ -163,6 +163,20 @@ class ProcessingPlugin:

def __init__(self, iface):
self.iface = iface
self.options_factory = None
self.drop_handler = None
self.item_provider = None
self.locator_filter = None
self.edit_features_locator_filter = None
self.initialized = False
self.initProcessing()

def initProcessing(self):
if not self.initialized:
self.initialized = True
Processing.initialize()

def initGui(self):
self.options_factory = ProcessingOptionsFactory()
self.options_factory.setTitle(self.tr('Processing'))
iface.registerOptionsWidgetFactory(self.options_factory)
@@ -176,9 +190,7 @@ def __init__(self, iface):
iface.currentLayerChanged.connect(lambda _: self.iface.invalidateLocatorResults())
self.edit_features_locator_filter = InPlaceAlgorithmLocatorFilter()
iface.registerLocatorFilter(self.edit_features_locator_filter)
Processing.initialize()

def initGui(self):
self.toolbox = ProcessingToolbox()
self.iface.addDockWidget(Qt.RightDockWidgetArea, self.toolbox)
self.toolbox.hide()

0 comments on commit 885f47d

Please sign in to comment.
You can’t perform that action at this time.