- 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:
@@ -48,6 +48,7 @@ class CutOut(AppTool):
|
||||
# #############################################################################
|
||||
self.ui = CutoutUI(layout=self.layout, app=self.app)
|
||||
self.pluginName = self.ui.pluginName
|
||||
self.connect_signals_at_init()
|
||||
|
||||
self.cutting_gapsize = 0.0
|
||||
self.cutting_dia = 0.0
|
||||
@@ -96,9 +97,6 @@ class CutOut(AppTool):
|
||||
# here store the tool data for the Cutout Tool
|
||||
self.cut_tool_dict = {}
|
||||
|
||||
# Signals
|
||||
self.connect_signals_at_init()
|
||||
|
||||
def on_type_obj_changed(self, val):
|
||||
obj_type = {'grb': 0, 'geo': 2}[val]
|
||||
self.ui.obj_combo.setRootModelIndex(self.app.collection.index(obj_type, 0, QtCore.QModelIndex()))
|
||||
@@ -198,6 +196,12 @@ class CutOut(AppTool):
|
||||
self.ui.reset_button.clicked.connect(self.set_tool_ui)
|
||||
|
||||
def set_tool_ui(self):
|
||||
|
||||
self.clear_ui(self.layout)
|
||||
self.ui = CutoutUI(layout=self.layout, app=self.app)
|
||||
self.pluginName = self.ui.pluginName
|
||||
self.connect_signals_at_init()
|
||||
|
||||
self.reset_fields()
|
||||
|
||||
# use the current selected object and make it visible in the object combobox
|
||||
|
||||
Reference in New Issue
Block a user