diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 0e862a77..2ae03215 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -409,7 +409,7 @@ class FlatCAMObj(QtCore.QObject): if self.deleted: raise ObjectDeleted() else: - key = self.mark_shapes[apid].add(tolerance=self.drawing_tolerance, **kwargs) + key = self.mark_shapes[apid].add(tolerance=self.drawing_tolerance, layer=0, **kwargs) return key def update_filters(self, last_ext, filter_string): @@ -1413,7 +1413,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): # add the shapes storage for marking apertures if self.app.is_legacy is False: for ap_code in self.apertures: - self.mark_shapes[ap_code] = self.app.plotcanvas.new_shape_collection(layers=2) + self.mark_shapes[ap_code] = self.app.plotcanvas.new_shape_collection(layers=1) else: for ap_code in self.apertures: self.mark_shapes[ap_code] = ShapeCollectionLegacy(obj=self, app=self.app, @@ -1675,7 +1675,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): if self.ui.apertures_table.cellWidget(cw_row, 5).isChecked(): self.marked_rows.append(True) # self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True) - self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'FF', + self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'AF', marked_aperture=aperture, visible=True, run_thread=True) # self.mark_shapes[aperture].redraw() else: @@ -1713,7 +1713,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): if mark_all: for aperture in self.apertures: # self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True) - self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'FF', + self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'AF', marked_aperture=aperture, visible=True) # HACK: enable/disable the grid for a better look self.app.ui.grid_snap_btn.trigger() diff --git a/README.md b/README.md index 6d4af587..d20e6150 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ CAD program, and create G-Code for Isolation routing. ================================================= +17.11.2019 + +- optimized the storage of the Gerber mark shapes by making them one layer only +- optimized the Distance Tool such that the distance utility geometry will be shown even when the mark shapes are plotted. + 16.11.2019 - fixed issue #341 that affected both postprocessors that have inlined feedrate: marlin and repetier. THe used feedrate was the Feedrate X-Y and instead had to be Feedrate Z. diff --git a/flatcamTools/ToolDistance.py b/flatcamTools/ToolDistance.py index ff28bb04..92e5a937 100644 --- a/flatcamTools/ToolDistance.py +++ b/flatcamTools/ToolDistance.py @@ -194,6 +194,12 @@ class Distance(FlatCAMTool): self.distance_y_entry.set_value('0.0') self.angle_entry.set_value('0.0') self.total_distance_entry.set_value('0.0') + + # this is a hack; seems that triggering the grid will make the visuals better + # trigger it twice to return to the original state + self.app.ui.grid_snap_btn.trigger() + self.app.ui.grid_snap_btn.trigger() + log.debug("Distance Tool --> tool initialized") def activate_measure_tool(self):