- 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

@@ -101,9 +101,25 @@ class AppTool(QtWidgets.QWidget):
self.show()
def clear_ui(self):
for i in reversed(range(self.layout.count())):
self.layout.itemAt(i).widget().setParent(None)
def clear_ui(self, layout):
# for item in reversed(range(layout.count())):
# lay_item = layout.itemAt(item)
#
# # in case that the widget is None
# try:
# widget = lay_item.widget()
# widget.setParent(None)
# except AttributeError:
# pass
if layout is not None:
while layout.count():
item = layout.takeAt(0)
widget = item.widget()
if widget is not None:
widget.setParent(None)
else:
self.clear_ui(item.layout())
def draw_tool_selection_shape(self, old_coords, coords, **kwargs):
"""