diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f44a0c7..7bd5ef12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta ================================================= +13.05.2022 + +- fixed the join-as-gerber functionality + 12.05.2022 - changed the syntax highlighting for the AppTextEditor such that the strings are not color marked diff --git a/appMain.py b/appMain.py index b09b2da8..d20170b2 100644 --- a/appMain.py +++ b/appMain.py @@ -4681,7 +4681,7 @@ class App(QtCore.QObject): return 'fail' def initialize(grb_obj, app): - GerberObject.merge(grb_list=objs, grb_final=grb_obj) + GerberObject.merge(grb_list=objs, grb_final=grb_obj, app=self) app.inform.emit('[success] %s.' % _("Gerber merging finished")) self.app_obj.new_object("gerber", 'Combo_Gerber', initialize) diff --git a/appObjects/GerberObject.py b/appObjects/GerberObject.py index 43a1dad9..ed02bf1a 100644 --- a/appObjects/GerberObject.py +++ b/appObjects/GerberObject.py @@ -1678,14 +1678,16 @@ class GerberObject(FlatCAMObj, Gerber): return gerber_code - def merge(self, grb_list, grb_final): + @staticmethod + def merge(grb_list, grb_final, app): """ Merges the geometry of objects in geo_list into the geometry of geo_final. - :param grb_list: List of GerberObject Objects to join. - :param grb_final: Destination GeometryObject object. - :return: None + :param grb_list: List of GerberObject Objects to join. + :param grb_final: Destination GeometryObject object. + :param app: the App class + :return: None """ if grb_final.solid_geometry is None: @@ -1710,7 +1712,7 @@ class GerberObject(FlatCAMObj, Gerber): try: grb_final.obj_options[option] = grb.obj_options[option] except KeyError: - self.app.log.warning("Failed to copy option.", option) + app.log.warning("Failed to copy option.", option) try: for geos in grb.solid_geometry: