Editor changes are lost after Save & Close

Issue #283 resolved
Victor Benso created an issue

After editing a Geometry imported from SVG, when clicking in "Save & Close Editor" the modifications to the geometry are lost.

I've tracked this down to: FlatCAMApp.py (https://bitbucket.org/jpcgt/flatcam/src/40c8ef1cf8d29b139eaf401babe0ccca85367208/FlatCAMApp.py) 2146 to 2151:

                  if isinstance(edited_obj, FlatCAMGeometry):
            obj_type = "Geometry"
            if cleanup is None: # <---- commenting this line avoids losing the modifications
                self.geo_editor.update_fcgeometry(edited_obj)
                self.geo_editor.update_options(edited_obj)
            self.geo_editor.deactivate()

Looks like the cleanup parameter isn't being set properly.

Comments (4)

  1. Marius Stanciu

    Actually 'cleanup' it's a default parameter for editor2object() function. The issue may be solved by calling the editor2object() slot function within a lambda. I made a commit containing this modification. Could you try and see if the issue you've seen is solved?

  2. Log in to comment