From 3c0ee97c61a0de7d9c8d68dcb1f77ef9d1effd6d Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 11 May 2020 20:10:27 +0300 Subject: [PATCH] - Snap Toolbar is now visible in Fullscreen - in Fullscreen now the Notebook is available but it will be hidden on Fullscreen launch - fixed some minor issues (in the HUD added a separating line, missing an icon in toolbars on first launch) --- CHANGELOG.md | 3 +++ FlatCAMApp.py | 6 ++++-- flatcamEditors/FlatCAMExcEditor.py | 2 +- flatcamEditors/FlatCAMGeoEditor.py | 2 +- flatcamEditors/FlatCAMGrbEditor.py | 9 ++++----- flatcamGUI/FlatCAMGUI.py | 2 ++ flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py | 3 +++ flatcamTools/ToolCopperThieving.py | 2 +- flatcamTools/ToolDistance.py | 2 +- flatcamTools/ToolNCC.py | 2 +- flatcamTools/ToolPaint.py | 2 +- 11 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0392dee2..62d94acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ CHANGELOG for FlatCAM beta - made the HUD work in Legacy2D mode - fixed situation when the mouse cursor is outside of the canvas and no therefore returning None values - remade the Snap Toolbar presence; now it is always active and situated in the Status Bar +- Snap Toolbar is now visible in Fullscreen +- in Fullscreen now the Notebook is available but it will be hidden on Fullscreen launch +- fixed some minor issues (in the HUD added a separating line, missing an icon in toolbars on first launch) 10.05.2020 diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 14e5b141..106b1496 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -4508,14 +4508,16 @@ class App(QtCore.QObject): for tb in self.ui.findChildren(QtWidgets.QToolBar): tb.setVisible(False) - self.ui.splitter_left.setVisible(False) + self.ui.snap_toolbar.setVisible(True) # This is always visible + # self.ui.splitter_left.setVisible(False) + self.ui.splitter.setSizes([0, 1]) self.toggle_fscreen = True elif self.toggle_fscreen is True or disable is True: self.ui.setWindowFlags(flags & ~Qt.FramelessWindowHint) self.ui.setGeometry(self.x_pos, self.y_pos, self.width, self.height) self.ui.showNormal() self.restore_toolbar_view() - self.ui.splitter_left.setVisible(True) + # self.ui.splitter_left.setVisible(True) self.toggle_fscreen = False def on_toggle_plotarea(self): diff --git a/flatcamEditors/FlatCAMExcEditor.py b/flatcamEditors/FlatCAMExcEditor.py index e598cc20..5023386c 100644 --- a/flatcamEditors/FlatCAMExcEditor.py +++ b/flatcamEditors/FlatCAMExcEditor.py @@ -3813,7 +3813,7 @@ class FlatCAMExcEditor(QtCore.QObject): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, x, units, y, units) diff --git a/flatcamEditors/FlatCAMGeoEditor.py b/flatcamEditors/FlatCAMGeoEditor.py index f897af79..d3675cfb 100644 --- a/flatcamEditors/FlatCAMGeoEditor.py +++ b/flatcamEditors/FlatCAMGeoEditor.py @@ -4284,7 +4284,7 @@ class FlatCAMGeoEditor(QtCore.QObject): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, x, units, y, units) diff --git a/flatcamEditors/FlatCAMGrbEditor.py b/flatcamEditors/FlatCAMGrbEditor.py index adcb5c9f..54dd72b4 100644 --- a/flatcamEditors/FlatCAMGrbEditor.py +++ b/flatcamEditors/FlatCAMGrbEditor.py @@ -4536,8 +4536,8 @@ class FlatCAMGrbEditor(QtCore.QObject): self.pos = (self.pos[0], self.pos[1]) if event.button == 1: - self.app.ui.rel_position_label.setText("Dx: %.4f   Dy: " - "%.4f    " % (0, 0)) + # self.app.ui.rel_position_label.setText("Dx: %.4f   Dy: " + # "%.4f    " % (0, 0)) # Selection with left mouse button if self.active_tool is not None: @@ -4549,8 +4549,7 @@ class FlatCAMGrbEditor(QtCore.QObject): self.app.defaults["global_point_clipboard_format"] % (self.decimals, self.pos[0], self.decimals, self.pos[1]) ) - self.app.inform.emit('[success] %s' % - _("Coordinates copied to clipboard.")) + self.app.inform.emit('[success] %s' % _("Coordinates copied to clipboard.")) return # Dispatch event to active_tool @@ -4787,7 +4786,7 @@ class FlatCAMGrbEditor(QtCore.QObject): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, x, units, y, units) diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py index 86dfb23f..62eeaa13 100644 --- a/flatcamGUI/FlatCAMGUI.py +++ b/flatcamGUI/FlatCAMGUI.py @@ -2555,6 +2555,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow): QtGui.QIcon(self.app.resource_location + '/distance_min32.png'), _("Distance Min Tool")) self.origin_btn = self.toolbargeo.addAction( QtGui.QIcon(self.app.resource_location + '/origin32.png'), _('Set Origin')) + self.move2origin_btn = self.toolbargeo.addAction( + QtGui.QIcon(self.app.resource_location + '/origin2_32.png'), _('Move to Origin')) self.jmp_btn = self.toolbargeo.addAction( QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), _('Jump to Location')) self.locate_btn = self.toolbargeo.addAction( diff --git a/flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py b/flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py index 914fc75f..3815bed7 100644 --- a/flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -748,6 +748,9 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.app.ui.exc_edit_toolbar.setVisible(False) self.app.ui.lock_toolbar(lock=True) + self.app.ui.corner_snap_btn.setVisible(False) + self.app.ui.snap_magnet.setVisible(False) + # add all the actions to the toolbars self.app.ui.populate_toolbars() diff --git a/flatcamTools/ToolCopperThieving.py b/flatcamTools/ToolCopperThieving.py index 2b3b447c..8adb9fc4 100644 --- a/flatcamTools/ToolCopperThieving.py +++ b/flatcamTools/ToolCopperThieving.py @@ -923,7 +923,7 @@ class ToolCopperThieving(FlatCAMTool): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units) diff --git a/flatcamTools/ToolDistance.py b/flatcamTools/ToolDistance.py index 7c28ed84..ef239454 100644 --- a/flatcamTools/ToolDistance.py +++ b/flatcamTools/ToolDistance.py @@ -551,7 +551,7 @@ class Distance(FlatCAMTool): # ) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( 0.0000, units, 0.0000, units, pos[0], units, pos[1], units) diff --git a/flatcamTools/ToolNCC.py b/flatcamTools/ToolNCC.py index 0a89be0e..b3ab7fa5 100644 --- a/flatcamTools/ToolNCC.py +++ b/flatcamTools/ToolNCC.py @@ -1838,7 +1838,7 @@ class NonCopperClear(FlatCAMTool, Gerber): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units) diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index 60abee34..131e025b 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -1737,7 +1737,7 @@ class ToolPaint(FlatCAMTool, Gerber): # "%.4f    " % (self.app.dx, self.app.dy)) units = self.app.defaults["units"].lower() - self.plotcanvas.text_hud.text = \ + self.app.plotcanvas.text_hud.text = \ 'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\n\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format( self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units)