From 4cf06b71e8ecb7396f8cef6f698790e891c73555 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 30 May 2018 18:39:04 +0300 Subject: [PATCH] - for whatever reason, using directly the name of the object in a QtGui.QStadardItem is creating issues in the tests. Converting it to a string solve this. After solving the conflict in the pull request this modification was lost so I am doing it again. - the FlatCAMObj.FlatCAMGerber.isolate() method is having the line app.obj.info() which randomly create issues due of using QPixMaps outside of the GUI thread. --- FlatCAMObj.py | 5 ++++- ObjectCollection.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index d4ea1d8b..b6d2c92b 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -554,7 +554,10 @@ class FlatCAMGerber(FlatCAMObj, Gerber): # Propagate options geo_obj.options["cnctooldia"] = self.options["isotooldia"] geo_obj.solid_geometry = generate_envelope (offset, i == 0) - app_obj.info("Isolation geometry created: %s" % geo_obj.options["name"]) + + # The following line is commented because it creates errors + # regarding QPixmaps used outside GUI thread + # app_obj.info("Isolation geometry created: %s" % geo_obj.options["name"]) # TODO: Do something if this is None. Offer changing name? self.app.new_object("geometry", iso_name, iso_init) diff --git a/ObjectCollection.py b/ObjectCollection.py index 3b82b1f8..ccc6a6da 100644 --- a/ObjectCollection.py +++ b/ObjectCollection.py @@ -162,7 +162,7 @@ class ObjectCollection(): # Create the model item to insert into the QListView icon = QtGui.QIcon(self.icons[obj.kind]) # self.icons["gerber"]) - item = QtGui.QStandardItem(icon, name) + item = QtGui.QStandardItem(icon, str(name)) # Item is not editable, so that double click # does not allow cell value modification. item.setEditable(False)