- fixed Measuring Tool - after doing a measurement the Notebook was switching to Project Tab without letting the user see the results
- more work on the translation engine; the app now restarts after a language is applied - added protection against using Travel Z parameter with negative or zero value (in Geometry).
This commit is contained in:
@@ -3,10 +3,10 @@ from GUIElements import FCEntry
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import math
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolCalculators')
|
||||
|
||||
|
||||
class ToolCalculator(FlatCAMTool):
|
||||
|
||||
@@ -2,10 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
||||
from ObjectCollection import *
|
||||
from FlatCAMApp import *
|
||||
from shapely.geometry import box
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolCutOut')
|
||||
|
||||
|
||||
class CutOut(FlatCAMTool):
|
||||
|
||||
@@ -5,10 +5,10 @@ from FlatCAMObj import *
|
||||
from shapely.geometry import Point
|
||||
from shapely import affinity
|
||||
from PyQt5 import QtCore
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolDblSided')
|
||||
|
||||
|
||||
class DblSidedTool(FlatCAMTool):
|
||||
|
||||
@@ -2,11 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
||||
|
||||
from GUIElements import RadioSet, FCEntry
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolFilm')
|
||||
|
||||
class Film(FlatCAMTool):
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
||||
|
||||
from GUIElements import RadioSet, FloatEntry, FCComboBox, IntEntry
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolImage')
|
||||
|
||||
class ToolImage(FlatCAMTool):
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
from VisPyVisuals import *
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from copy import copy
|
||||
from math import sqrt
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolMeasurement')
|
||||
|
||||
|
||||
class Measurement(FlatCAMTool):
|
||||
|
||||
@@ -160,6 +162,11 @@ class Measurement(FlatCAMTool):
|
||||
|
||||
if self.app.tool_tab_locked is True:
|
||||
return
|
||||
|
||||
# if the splitter is hidden, display it, else hide it but only if the current widget is the same
|
||||
if self.app.ui.splitter.sizes()[0] == 0:
|
||||
self.app.ui.splitter.setSizes([1, 1])
|
||||
|
||||
self.toggle()
|
||||
|
||||
self.set_tool_ui()
|
||||
@@ -185,6 +192,7 @@ class Measurement(FlatCAMTool):
|
||||
if self.active is True:
|
||||
# DISABLE the Measuring TOOL
|
||||
self.active = False
|
||||
|
||||
# disconnect the mouse/key events from functions of measurement tool
|
||||
self.app.plotcanvas.vis_disconnect('mouse_move', self.on_mouse_move_meas)
|
||||
self.app.plotcanvas.vis_disconnect('mouse_press', self.on_click_meas)
|
||||
@@ -206,6 +214,7 @@ class Measurement(FlatCAMTool):
|
||||
self.app.exc_editor.canvas.vis_connect('key_press', self.app.exc_editor.on_canvas_key)
|
||||
self.app.exc_editor.canvas.vis_connect('mouse_release', self.app.exc_editor.on_canvas_click_release)
|
||||
|
||||
self.app.call_source = 'measurement'
|
||||
self.clicked_meas = 0
|
||||
self.app.command_active = None
|
||||
# delete the measuring line
|
||||
|
||||
@@ -4,10 +4,10 @@ from VisPyVisuals import *
|
||||
|
||||
from io import StringIO
|
||||
from copy import copy
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolMove')
|
||||
|
||||
|
||||
class ToolMove(FlatCAMTool):
|
||||
|
||||
@@ -2,10 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
||||
from copy import copy,deepcopy
|
||||
from ObjectCollection import *
|
||||
import time
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolNonCopperClear')
|
||||
|
||||
|
||||
class NonCopperClear(FlatCAMTool, Gerber):
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from copy import copy,deepcopy
|
||||
from ObjectCollection import *
|
||||
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolPaint')
|
||||
|
||||
class ToolPaint(FlatCAMTool, Gerber):
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
||||
from copy import copy, deepcopy
|
||||
from ObjectCollection import *
|
||||
import time
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolPanelize')
|
||||
|
||||
|
||||
class Panelize(FlatCAMTool):
|
||||
|
||||
@@ -2,10 +2,10 @@ from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
from PyQt5.QtCore import Qt
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolProperties')
|
||||
|
||||
|
||||
class Properties(FlatCAMTool):
|
||||
|
||||
@@ -12,10 +12,10 @@ from PyQt5.QtGui import QTextCursor
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QWidget
|
||||
from GUIElements import _BrowserTextEdit, _ExpandableTextEdit
|
||||
import html
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolShell')
|
||||
|
||||
|
||||
class TermWidget(QWidget):
|
||||
|
||||
@@ -16,10 +16,10 @@ from shapely.ops import cascaded_union
|
||||
|
||||
import traceback
|
||||
from io import StringIO
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolSolderPaste')
|
||||
|
||||
|
||||
class SolderPaste(FlatCAMTool):
|
||||
|
||||
@@ -3,10 +3,10 @@ from PyQt5.QtCore import Qt
|
||||
from GUIElements import FCEntry, FCButton, OptionalInputSection
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ToolTransform')
|
||||
|
||||
|
||||
class ToolTransform(FlatCAMTool):
|
||||
|
||||
Reference in New Issue
Block a user