- fixed issue with geometry name not being updated immediately after change while doing geocutout TclCommand

- some changes to enable/disable project context menu entry handlers
This commit is contained in:
Marius Stanciu
2019-06-02 14:04:14 +03:00
parent dca57edf24
commit c409df0a8e
5 changed files with 43 additions and 72 deletions

View File

@@ -120,7 +120,7 @@ class TclCommandCutout(TclCommand):
geo_obj.solid_geometry = cascaded_union([LineString(segment) for segment in cuts])
try:
obj.app.new_object("geometry", name + "_cutout", geo_init_me)
self.app.new_object("geometry", name + "_cutout", geo_init_me)
self.app.inform.emit("[success] Rectangular-form Cutout operation finished.")
except Exception as e:
return "Operation failed: %s" % str(e)

View File

@@ -221,6 +221,7 @@ class TclCommandGeoCutout(TclCommandSignaled):
cutout_obj.plot()
self.app.inform.emit("[success] Any-form Cutout operation finished.")
self.app.plots_updated.emit()
elif isinstance(cutout_obj, FlatCAMGerber):
def geo_init(geo_obj, app_obj):
@@ -267,7 +268,7 @@ class TclCommandGeoCutout(TclCommandSignaled):
ymin - gapsize,
px + gapsize,
ymax + gapsize)
geo_obj.solid_geometry = geo
geo_obj.solid_geometry = deepcopy(geo)
outname = cutout_obj.options["name"] + "_cutout"
self.app.new_object('geometry', outname, geo_init)