- added protection, not allowing the user to make a Paint job on a MultiGeo geometry (one that is converted in the Edit -> Conversion menu)) because it is not supported

This commit is contained in:
Marius Stanciu
2019-02-23 16:25:16 +02:00
committed by Marius S
parent 3bad47b3be
commit 568d97d899
2 changed files with 8 additions and 0 deletions

View File

@@ -734,6 +734,12 @@ class ToolPaint(FlatCAMTool, Gerber):
self.app.inform.emit("[ERROR_NOTCL]Object not found: %s" % self.paint_obj)
return
# test if the Geometry Object is multigeo and return Fail if True because
# for now Paint don't work on MultiGeo
if self.paint_obj.multigeo is True:
self.app.inform.emit("[ERROR_NOTCL] Can't do Paint on MultiGeo geometries ...")
return 'Fail'
o_name = '%s_multitool_paint' % (self.obj_name)
if select_method == "all":
@@ -787,6 +793,7 @@ class ToolPaint(FlatCAMTool, Gerber):
# Which polygon.
# poly = find_polygon(self.solid_geometry, inside_pt)
poly = obj.find_polygon(inside_pt)
paint_method = self.paintmethod_combo.get_value()