diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 935d75c8..48a7861e 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -85,7 +85,8 @@ class FlatCAMObj(QtCore.QObject): if self.app.is_legacy is False: self.shapes = self.app.plotcanvas.new_shape_group() else: - self.shapes = ShapeCollectionLegacy(obj=self, app=self.app, name='application') + # dont't give an axis name to this one or it will delete the old object when loading a new one + self.shapes = ShapeCollectionLegacy(obj=self, app=self.app) # self.mark_shapes = self.app.plotcanvas.new_shape_collection(layers=2) self.mark_shapes = {} diff --git a/README.md b/README.md index 320f73c7..02b9f288 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ CAD program, and create G-Code for Isolation routing. ================================================= +23.09.2019 + +- in legacy graphic engine, fixed bug that made the old object disappear when a new object was loaded +- in legacy graphic engine, fixed bug that crashed the app when creating a new project + 22.09.2019 - fixed zoom directions legacy graphic engine (previous commit) diff --git a/flatcamGUI/PlotCanvasLegacy.py b/flatcamGUI/PlotCanvasLegacy.py index 05a8dadc..2e694ff5 100644 --- a/flatcamGUI/PlotCanvasLegacy.py +++ b/flatcamGUI/PlotCanvasLegacy.py @@ -306,10 +306,21 @@ class PlotCanvasLegacy(QtCore.QObject): self.figure.add_axes(self.axes) self.axes.set_aspect(1) self.axes.grid(True) + self.axes.axhline(color=(0.70, 0.3, 0.3), linewidth=2) + self.axes.axvline(color=(0.70, 0.3, 0.3), linewidth=2) + + self.adjust_axes(-10, -10, 100, 100) # Re-draw self.canvas.draw_idle() + def redraw(self): + """ + Created only to serve for compatibility with the VisPy plotcanvas (the other graphic engine, 3D) + :return: + """ + self.clear() + def adjust_axes(self, xmin, ymin, xmax, ymax): """ Adjusts all axes while maintaining the use of the whole canvas