Просмотр исходного кода

- in legacy graphic engine fixed the axis toggle
- French Google-translation at 48%

Marius Stanciu 6 лет назад
Родитель
Сommit
3941544558
5 измененных файлов с 300 добавлено и 238 удалено
  1. 16 7
      FlatCAMApp.py
  2. 3 1
      README.md
  3. 16 7
      flatcamGUI/FlatCAMGUI.py
  4. BIN
      locale/fr/LC_MESSAGES/strings.mo
  5. 265 223
      locale/fr/LC_MESSAGES/strings.po

+ 16 - 7
FlatCAMApp.py

@@ -5628,15 +5628,24 @@ class App(QtCore.QObject):
         self.report_usage("on_toggle_axis()")
 
         if self.toggle_axis is False:
-            self.plotcanvas.v_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
-            self.plotcanvas.h_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
-            self.plotcanvas.redraw()
+            if self.is_legacy is False:
+                self.plotcanvas.v_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
+                self.plotcanvas.h_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
+                self.plotcanvas.redraw()
+            else:
+                self.plotcanvas.axes.axhline(color=(0.70, 0.3, 0.3), linewidth=2)
+                self.plotcanvas.axes.axvline(color=(0.70, 0.3, 0.3), linewidth=2)
+                self.plotcanvas.canvas.draw()
+                pass
             self.toggle_axis = True
         else:
-            self.plotcanvas.v_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
-
-            self.plotcanvas.h_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
-            self.plotcanvas.redraw()
+            if self.is_legacy is False:
+                self.plotcanvas.v_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
+                self.plotcanvas.h_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
+                self.plotcanvas.redraw()
+            else:
+                self.plotcanvas.axes.lines[:] = []
+                self.plotcanvas.canvas.draw()
             self.toggle_axis = False
 
     def on_toggle_grid(self):

+ 3 - 1
README.md

@@ -14,6 +14,8 @@ CAD program, and create G-Code for Isolation routing.
 - French translation at 33%
 - fixed the 'Jump To' function to work in legacy graphic engine
 - in legacy graphic engine fixed the mouse cursor shape when grid snapping is ON, such that it fits with the shape from the OpenGL graphic engine
+- in legacy graphic engine fixed the axis toggle
+- French Google-translation at 48%
 
 24.09.2019
 
@@ -24,7 +26,7 @@ CAD program, and create G-Code for Isolation routing.
 - in legacy graphic engine, fixed issue where immediately after panning finished the mouse cursor shape was not updated
 - unfortunately the fix for issue where while zooming the mouse cursor shape was not updated braked something in way that Matplotlib work with PyQt5, therefore I removed it
 - fixed a bug in legacy graphic engine: when doing the self.app.collection.delete_all() in new_project an app crash occurred
-- implemented the Annotation change in CNCJob Selected Tab
+- implemented the Annotation change in CNCJob Selected Tab for the legacy graphic engine
 
 23.09.2019
 

+ 16 - 7
flatcamGUI/FlatCAMGUI.py

@@ -2347,15 +2347,24 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 # Toggle axis
                 if key == QtCore.Qt.Key_G:
                     if self.app.toggle_axis is False:
-                        self.app.plotcanvas.v_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
-                        self.app.plotcanvas.h_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
-                        self.app.plotcanvas.redraw()
+                        if self.app.is_legacy is False:
+                            self.app.plotcanvas.v_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
+                            self.app.plotcanvas.h_line.set_data(color=(0.70, 0.3, 0.3, 1.0))
+                            self.app.plotcanvas.redraw()
+                        else:
+                            self.app.plotcanvas.axes.axhline(color=(0.70, 0.3, 0.3), linewidth=2)
+                            self.app.plotcanvas.axes.axvline(color=(0.70, 0.3, 0.3), linewidth=2)
+                            self.app.plotcanvas.canvas.draw()
+
                         self.app.toggle_axis = True
                     else:
-                        self.app.plotcanvas.v_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
-
-                        self.app.plotcanvas.h_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
-                        self.app.plotcanvas.redraw()
+                        if self.app.is_legacy is False:
+                            self.app.plotcanvas.v_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
+                            self.app.plotcanvas.h_line.set_data(color=(0.0, 0.0, 0.0, 0.0))
+                            self.app.plotcanvas.redraw()
+                        else:
+                            self.app.plotcanvas.axes.lines[:] = []
+                            self.app.plotcanvas.canvas.draw()
                         self.app.toggle_axis = False
 
                 # Open Preferences Window

BIN
locale/fr/LC_MESSAGES/strings.mo


Разница между файлами не показана из-за своего большого размера
+ 265 - 223
locale/fr/LC_MESSAGES/strings.po


Некоторые файлы не были показаны из-за большого количества измененных файлов