Marius Stanciu пре 6 година
родитељ
комит
7fd8d99932
1 измењених фајлова са 9 додато и 6 уклоњено
  1. 9 6
      flatcamTools/ToolSilk.py

+ 9 - 6
flatcamTools/ToolSilk.py

@@ -10,7 +10,7 @@
 from FlatCAMTool import FlatCAMTool
 from FlatCAMTool import FlatCAMTool
 # from copy import copy, deepcopy
 # from copy import copy, deepcopy
 from ObjectCollection import *
 from ObjectCollection import *
-# import time
+import time
 
 
 import gettext
 import gettext
 import FlatCAMTranslation as fcTranslate
 import FlatCAMTranslation as fcTranslate
@@ -196,16 +196,19 @@ class ToolSilk(FlatCAMTool):
                             else:
                             else:
                                 new_solid_geometry.append(geo_silk)
                                 new_solid_geometry.append(geo_silk)
 
 
-        # while not self.new_apertures[aperture_id]['solid_geometry']:
         try:
         try:
-            self.new_apertures[aperture_id]['solid_geometry'] = new_solid_geometry
+            while True:
+                self.new_apertures[aperture_id]['solid_geometry'] = new_solid_geometry
+                time.sleep(0.1)
         except:
         except:
             pass
             pass
 
 
-        # while aperture_id in self.promises:
-        # removal from list is done in a multithreaded way therefore not always the removal can be done
         try:
         try:
-            self.promises.remove(aperture_id)
+            while True:
+                # removal from list is done in a multithreaded way therefore not always the removal can be done
+                # so we keep trying until it's done
+                self.promises.remove(aperture_id)
+                time.sleep(0.1)
         except:
         except:
             pass
             pass