- when a Plugin is no longer used disconnect a certain signal that control the selection in the App Object Target combobox since it is not needed and it takes cpu cycles

This commit is contained in:
Marius Stanciu
2021-09-02 19:38:30 +03:00
committed by Marius Stanciu
parent 585231ec51
commit 1f321f9dcb
2 changed files with 9 additions and 0 deletions

View File

@@ -6704,6 +6704,14 @@ class App(QtCore.QObject):
# except Exception as err:
# print(str(err))
try:
# this signal is used by the Plugins to change the selection on App objects combo boxes when the
# selection happen in Project Tab (collection view)
# when the plugin is closed then it's not needed
self.proj_selection_changed.disconnect()
except (TypeError, AttributeError):
pass
try:
# clear the possible drawn probing shapes for Levelling Tool
self.levelling_tool.probing_shapes.clear(update=True)