From 5b3f318e567555f258bb7fab5e48b36dcd3fa854 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 12 Jan 2020 17:26:48 +0200 Subject: [PATCH] - if CTRL key is pressed during app startup the app will start in the Legacy(2D) graphic engine compatibility mode --- FlatCAMApp.py | 9 ++++++--- README.md | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 63504639..2b25ad8f 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -12025,7 +12025,12 @@ class App(QtCore.QObject): else: plot_container = self.ui.right_layout - if self.is_legacy is False: + modifier = QtWidgets.QApplication.queryKeyboardModifiers() + if self.is_legacy is True or modifier == QtCore.Qt.ControlModifier: + self.is_legacy = True + self.defaults["global_graphic_engine"] = "2D" + self.plotcanvas = PlotCanvasLegacy(plot_container, self) + else: try: self.plotcanvas = PlotCanvas(plot_container, self) except Exception as er: @@ -12038,8 +12043,6 @@ class App(QtCore.QObject): msg += msg_txt self.inform.emit(msg) return 'fail' - else: - self.plotcanvas = PlotCanvasLegacy(plot_container, self) # So it can receive key presses self.plotcanvas.native.setFocus() diff --git a/README.md b/README.md index 57224d90..786cbb6b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing. - improved the circle approximation resolution - fixed an issue in Gerber parser with detecting old kind of units +- if CTRL key is pressed during app startup the app will start in the Legacy(2D) graphic engine compatibility mode 11.01.2020