- added more key shortcuts into the application; they are now displayed in the GUI menu's

- reorganized the Edit -> Preferences -> Global
- redesigned the messagebox that is showed when quiting ot creating a New Project: now it has an option ('Cancel') to abort the process returning to the app
This commit is contained in:
Marius Stanciu
2019-01-27 03:32:09 +02:00
committed by Marius S
parent c0031235cd
commit c4a9c8bd77
22 changed files with 595 additions and 326 deletions

View File

@@ -7,12 +7,12 @@ from math import sqrt
class Measurement(FlatCAMTool):
toolName = "Measurement Tool"
toolName = "Measurement"
def __init__(self, app):
FlatCAMTool.__init__(self, app)
self.units = self.app.general_options_form.general_group.units_radio.get_value().lower()
self.units = self.app.general_options_form.general_app_group.units_radio.get_value().lower()
## Title
title_label = QtWidgets.QLabel("<font size=4><b>%s</b></font><br>" % self.toolName)
@@ -165,10 +165,13 @@ class Measurement(FlatCAMTool):
# Switch notebook to tool page
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
self.units = self.app.general_options_form.general_group.units_radio.get_value().lower()
self.units = self.app.general_options_form.general_app_group.units_radio.get_value().lower()
self.show()
self.app.ui.notebook.setTabText(2, "Meas. Tool")
def install(self, icon=None, separator=None, **kwargs):
FlatCAMTool.install(self, icon, separator, shortcut='CTRL+M', **kwargs)
def on_key_release_meas(self, event):
if event.key == 'escape':
# abort the measurement action
@@ -217,7 +220,7 @@ class Measurement(FlatCAMTool):
else:
# ENABLE the Measuring TOOL
self.active = True
self.units = self.app.general_options_form.general_group.units_radio.get_value().lower()
self.units = self.app.general_options_form.general_app_group.units_radio.get_value().lower()
# we disconnect the mouse/key handlers from wherever the measurement tool was called
if self.app.call_source == 'app':