- upgraded all the plugins such that at each launch the Plugin UI is reinitialized reducing the chances to get errors like "wrapped up C++ object deleted" with the side effect that the performance might be slightly reduced

This commit is contained in:
Marius Stanciu
2021-03-28 15:21:17 +03:00
committed by Marius
parent d0327ff37d
commit 4c92083c01
39 changed files with 1239 additions and 957 deletions

View File

@@ -39,6 +39,7 @@ class PcbWizard(AppTool):
# #############################################################################
self.ui = WizardUI(layout=self.layout, app=self.app)
self.pluginName = self.ui.pluginName
self.connect_signals_at_init()
self.excellon_loaded = False
self.inf_loaded = False
@@ -46,15 +47,6 @@ class PcbWizard(AppTool):
self.modified_excellon_file = ''
# ## Signals
self.ui.excellon_brn.clicked.connect(self.on_load_excellon_click)
self.ui.inf_btn.clicked.connect(self.on_load_inf_click)
self.ui.import_button.clicked.connect(lambda: self.on_import_excellon(
excellon_fileobj=self.modified_excellon_file))
self.file_loaded.connect(self.on_file_loaded)
self.ui.units_radio.activated_custom.connect(self.ui.on_units_change)
self.units = 'INCH'
self.zeros = 'LZ'
self.integral = 2
@@ -113,12 +105,27 @@ class PcbWizard(AppTool):
def install(self, icon=None, separator=None, **kwargs):
AppTool.install(self, icon, separator, **kwargs)
def connect_signals_at_init(self):
# ## Signals
self.ui.excellon_brn.clicked.connect(self.on_load_excellon_click)
self.ui.inf_btn.clicked.connect(self.on_load_inf_click)
self.ui.import_button.clicked.connect(lambda: self.on_import_excellon(
excellon_fileobj=self.modified_excellon_file))
self.file_loaded.connect(self.on_file_loaded)
self.ui.units_radio.activated_custom.connect(self.ui.on_units_change)
def set_tool_ui(self):
self.units = 'INCH'
self.zeros = 'LZ'
self.integral = 2
self.fractional = 4
self.clear_ui(self.layout)
self.ui = WizardUI(layout=self.layout, app=self.app)
self.pluginName = self.ui.pluginName
self.connect_signals_at_init()
self.outname = 'file'
self.exc_file_content = None