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

Merged in marius_stanciu/flatcam_beta/Beta (pull request #200)

Beta
Marius Stanciu 6 лет назад
Родитель
Сommit
782b4442de

+ 245 - 40
FlatCAMApp.py

@@ -504,6 +504,7 @@ class App(QtCore.QObject):
                 self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_mm_entry,
             "excellon_zeros": self.ui.excellon_defaults_form.excellon_gen_group.excellon_zeros_radio,
             "excellon_units": self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio,
+            "excellon_update": self.ui.excellon_defaults_form.excellon_gen_group.update_excellon_cb,
             "excellon_optimization_type": self.ui.excellon_defaults_form.excellon_gen_group.excellon_optimization_radio,
             "excellon_search_time": self.ui.excellon_defaults_form.excellon_gen_group.optimization_time_entry,
 
@@ -907,6 +908,7 @@ class App(QtCore.QObject):
             "excellon_format_lower_mm": 3,
             "excellon_zeros": "L",
             "excellon_units": "INCH",
+            "excellon_update": True,
             "excellon_optimization_type": 'B',
             "excellon_search_time": 3,
 
@@ -1828,6 +1830,14 @@ class App(QtCore.QObject):
         # Monitor the checkbox from the Application Defaults Tab and show the TCL shell or not depending on it's value
         self.ui.general_defaults_form.general_app_group.shell_startup_cb.clicked.connect(self.on_toggle_shell)
 
+        # Make sure that when the Excellon loading parameters are changed, the change is reflected in the
+        # Export Excellon parameters.
+        self.ui.excellon_defaults_form.excellon_gen_group.update_excellon_cb.stateChanged.connect(
+            self.on_update_exc_export
+        )
+        # call it once to make sure it is updated at startup
+        self.on_update_exc_export(state=self.defaults["excellon_update"])
+
         # Load the defaults values into the Excellon Format and Excellon Zeros fields
         self.ui.excellon_defaults_form.excellon_opt_group.excellon_defaults_button.clicked.connect(
             self.on_excellon_defaults_button)
@@ -3821,18 +3831,17 @@ class App(QtCore.QObject):
 
                 title = QtWidgets.QLabel(
                     "<font size=8><B>FlatCAM</B></font><BR>"
-                    "%s<BR>"
-                    "%s.<BR>"
+                    "{title}<BR>"
                     "<BR>"
                     "<BR>"
-                    "<B>%s</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<B>{devel}</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
                     "<a href = \"https://bitbucket.org/jpcgt/flatcam/src/Beta/\">here.</a><BR>"
-                    "<b>%s</B> area &nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<b>{down}</B> area &nbsp;&nbsp;&nbsp;&nbsp;"
                     "<a href = \"https://bitbucket.org/jpcgt/flatcam/downloads/\">here.</a><BR>"
-                    "<b>%s</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
-                    "<a href = \"https://bitbucket.org/jpcgt/flatcam/issues?status=new&status=open/\">here.</a><BR>" %
-                    (_("2D Computer-Aided Printed Circuit Board"), _("Manufacturing"), _("Development"), _("DOWNLOAD"),
-                     _("Issue tracker"))
+                    "<b> {issue}</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<a href = \"https://bitbucket.org/jpcgt/flatcam/issues?status=new&status=open/\">here.</a><BR>".
+                        format(title=_("2D Computer-Aided Printed Circuit Board Manufacturing"),
+                               devel=_("Development"), down=_("DOWNLOAD"), issue=_("Issue tracker"))
                 )
                 title.setOpenExternalLinks(True)
 
@@ -3928,15 +3937,15 @@ class App(QtCore.QObject):
                 self.programmmers_tab_layout.addStretch()
 
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Programmer")), 0, 0)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Function")), 0, 1)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Juan Pablo Caram <BR>"), 1, 0)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Status")), 0, 1)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Juan Pablo Caram"), 1, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % _("Program Author")), 1, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Denis Hayrullin"), 2, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 2, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Kamil Sopko"), 3, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 3, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Marius Stanciu"), 4, 0)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Maintainer >=2019"), 4, 1)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % _("Maintainer >=2019")), 4, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Matthieu Berthomé"), 5, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 5, 1)
 
@@ -5135,6 +5144,134 @@ class App(QtCore.QObject):
         self.options_form_fields["excellon_units"].set_value('INCH')
         log.debug("Excellon options defaults loaded ...")
 
+    def on_update_exc_export(self, state):
+        """
+        This is handling the update of Excellon Export parameters based on the ones in the Excellon General but only
+        if the update_excellon_cb checkbox is checked
+
+        :param state: state of the checkbox whose signals is tied to his slot
+        :return:
+        """
+        if state:
+            # first try to disconnect
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_in_entry.textChanged.\
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_in_entry.textChanged.\
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_mm_entry.textChanged.\
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_mm_entry.textChanged.\
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_zeros_radio.activated_custom.\
+                    disconnect(self.on_excellon_zeros_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio.activated_custom.\
+                    disconnect(self.on_excellon_zeros_changed)
+            except TypeError:
+                pass
+
+            # the connect them
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_in_entry.textChanged.connect(
+                self.on_excellon_format_changed)
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_in_entry.textChanged.connect(
+                self.on_excellon_format_changed)
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_mm_entry.textChanged.connect(
+                self.on_excellon_format_changed)
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_mm_entry.textChanged.connect(
+                self.on_excellon_format_changed)
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_zeros_radio.activated_custom.connect(
+                self.on_excellon_zeros_changed)
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio.activated_custom.connect(
+                self.on_excellon_units_changed)
+        else:
+            # disconnect the signals
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_in_entry.textChanged. \
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_in_entry.textChanged. \
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_mm_entry.textChanged. \
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_mm_entry.textChanged. \
+                    disconnect(self.on_excellon_format_changed)
+            except TypeError:
+                pass
+
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_zeros_radio.activated_custom. \
+                    disconnect(self.on_excellon_zeros_changed)
+            except TypeError:
+                pass
+            try:
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio.activated_custom. \
+                    disconnect(self.on_excellon_zeros_changed)
+            except TypeError:
+                pass
+
+    def on_excellon_format_changed(self):
+        """
+        Slot activated when the user changes the Excellon format values in Preferences -> Excellon -> Excellon General
+        :return: None
+        """
+        if self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio.get_value().upper() == 'METRIC':
+            self.ui.excellon_defaults_form.excellon_exp_group.format_whole_entry.set_value(
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_mm_entry.get_value()
+            )
+            self.ui.excellon_defaults_form.excellon_exp_group.format_dec_entry.set_value(
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_mm_entry.get_value()
+            )
+        else:
+            self.ui.excellon_defaults_form.excellon_exp_group.format_whole_entry.set_value(
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_in_entry.get_value()
+            )
+            self.ui.excellon_defaults_form.excellon_exp_group.format_dec_entry.set_value(
+                self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_lower_in_entry.get_value()
+            )
+
+    def on_excellon_zeros_changed(self):
+        """
+        Slot activated when the user changes the Excellon zeros values in Preferences -> Excellon -> Excellon General
+        :return: None
+        """
+        self.ui.excellon_defaults_form.excellon_exp_group.zeros_radio.set_value(
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_zeros_radio.get_value() + 'Z'
+        )
+
+    def on_excellon_units_changed(self):
+        """
+        Slot activated when the user changes the Excellon unit values in Preferences -> Excellon -> Excellon General
+        :return: None
+        """
+        self.ui.excellon_defaults_form.excellon_exp_group.excellon_units_radio.set_value(
+            self.ui.excellon_defaults_form.excellon_gen_group.excellon_units_radio.get_value()
+        )
+        self.on_excellon_format_changed()
+
     # Setting plot colors handlers
     def on_pf_color_entry(self):
         self.defaults['global_plot_fill'] = \
@@ -5519,17 +5656,19 @@ class App(QtCore.QObject):
             self.ui.addToolBar(self.ui.toolbartools)
 
             self.ui.exc_edit_toolbar = QtWidgets.QToolBar('Excellon Editor Toolbar')
-            self.ui.exc_edit_toolbar.setVisible(False)
+            # self.ui.exc_edit_toolbar.setVisible(False)
             self.ui.exc_edit_toolbar.setObjectName('ExcEditor_TB')
             self.ui.addToolBar(self.ui.exc_edit_toolbar)
 
+            self.ui.addToolBarBreak()
+
             self.ui.geo_edit_toolbar = QtWidgets.QToolBar('Geometry Editor Toolbar')
-            self.ui.geo_edit_toolbar.setVisible(False)
+            # self.ui.geo_edit_toolbar.setVisible(False)
             self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
             self.ui.addToolBar(self.ui.geo_edit_toolbar)
 
             self.ui.grb_edit_toolbar = QtWidgets.QToolBar('Gerber Editor Toolbar')
-            self.ui.grb_edit_toolbar.setVisible(False)
+            # self.ui.grb_edit_toolbar.setVisible(False)
             self.ui.grb_edit_toolbar.setObjectName('GrbEditor_TB')
             self.ui.addToolBar(self.ui.grb_edit_toolbar)
 
@@ -5545,12 +5684,11 @@ class App(QtCore.QObject):
             self.ui.toolbarfile = QtWidgets.QToolBar('File Toolbar')
             self.ui.toolbarfile.setObjectName('File_TB')
             self.ui.addToolBar(Qt.LeftToolBarArea, self.ui.toolbarfile)
+
             self.ui.toolbargeo = QtWidgets.QToolBar('Edit Toolbar')
             self.ui.toolbargeo.setObjectName('Edit_TB')
             self.ui.addToolBar(Qt.LeftToolBarArea, self.ui.toolbargeo)
-            self.ui.toolbarview = QtWidgets.QToolBar('View Toolbar')
-            self.ui.toolbarview.setObjectName('View_TB')
-            self.ui.addToolBar(Qt.LeftToolBarArea, self.ui.toolbarview)
+
 
             self.ui.toolbarshell = QtWidgets.QToolBar('Shell Toolbar')
             self.ui.toolbarshell.setObjectName('Shell_TB')
@@ -5565,6 +5703,12 @@ class App(QtCore.QObject):
             self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
             self.ui.addToolBar(Qt.RightToolBarArea, self.ui.geo_edit_toolbar)
 
+            self.ui.toolbarview = QtWidgets.QToolBar('View Toolbar')
+            self.ui.toolbarview.setObjectName('View_TB')
+            self.ui.addToolBar(Qt.RightToolBarArea, self.ui.toolbarview)
+
+            self.ui.addToolBarBreak(area=Qt.RightToolBarArea)
+
             self.ui.grb_edit_toolbar = QtWidgets.QToolBar('Gerber Editor Toolbar')
             # self.ui.grb_edit_toolbar.setVisible(False)
             self.ui.grb_edit_toolbar.setObjectName('GrbEditor_TB')
@@ -9923,29 +10067,90 @@ class App(QtCore.QObject):
 
         tsize = fsize + int(fsize / 2)
 
-        selected_text = (_('''
-<p><span style="font-size:{tsize}px"><strong>Selected Tab - Choose an Item from Project Tab</strong></span></p>
-
-<p><span style="font-size:{fsize}px"><strong>Details</strong>:<br />
-The normal flow when working in FlatCAM is the following:</span></p>
-
-<ol>
-	<li><span style="font-size:{fsize}px">Loat/Import a Gerber, Excellon, Gcode, DXF, Raster Image or SVG file into FlatCAM using either the menu&#39;s, toolbars, key shortcuts or even dragging and dropping the files on the GUI.<br />
-	<br />
-	You can also load a <strong>FlatCAM project</strong> by double clicking on the project file, drag &amp; drop of the file into the FLATCAM GUI or through the menu/toolbar links offered within the app.</span><br />
-	&nbsp;</li>
-	<li><span style="font-size:{fsize}px">Once an object is available in the Project Tab, by selecting it and then focusing on <strong>SELECTED TAB </strong>(more simpler is to double click the object name in the Project Tab), <strong>SELECTED TAB </strong>will be updated with the object properties according to it&#39;s kind: Gerber, Excellon, Geometry or CNCJob object.<br />
-	<br />
-	If the selection of the object is done on the canvas by single click instead, and the <strong>SELECTED TAB</strong> is in focus, again the object properties will be displayed into the Selected Tab. Alternatively, double clicking on the object on the canvas will bring the <strong>SELECTED TAB</strong> and populate it even if it was out of focus.<br />
-	<br />
-	You can change the parameters in this screen and the flow direction is like this:<br />
-	<br />
-	<strong>Gerber/Excellon Object</strong> -&gt; Change Param -&gt; Generate Geometry -&gt;<strong> Geometry Object </strong>-&gt; Add tools (change param in Selected Tab) -&gt; Generate CNCJob -&gt;<strong> CNCJob Object </strong>-&gt; Verify GCode (through Edit CNC Code) and/or append/prepend to GCode (again, done in <strong>SELECTED TAB)&nbsp;</strong>-&gt; Save GCode</span></li>
-</ol>
-
-<p><span style="font-size:{fsize}px">A list of key shortcuts is available through an menu entry in <strong>Help -&gt; Shortcuts List</strong>&nbsp;or through it&#39;s own key shortcut: <strng>F3</strong>.</span></p>
-
-        ''').format(fsize=fsize, tsize=tsize))
+#         selected_text = (_('''
+# <p><span style="font-size:{tsize}px"><strong>Selected Tab - Choose an Item from Project Tab</strong></span></p>
+#
+# <p><span style="font-size:{fsize}px"><strong>Details</strong>:<br />
+# The normal flow when working in FlatCAM is the following:</span></p>
+#
+# <ol>
+# 	<li><span style="font-size:{fsize}px">Loat/Import a Gerber, Excellon, Gcode, DXF, Raster Image or SVG file into
+        # 	FlatCAM using either the menu&#39;s, toolbars, key shortcuts or
+        # 	even dragging and dropping the files on the GUI.<br />
+# 	<br />
+# 	You can also load a <strong>FlatCAM project</strong> by double clicking on the project file, drag &amp; drop of the
+        # 	file into the FLATCAM GUI or through the menu/toolbar links offered within the app.</span><br />
+# 	&nbsp;</li>
+# 	<li><span style="font-size:{fsize}px">Once an object is available in the Project Tab, by selecting it and then
+        # 	focusing on <strong>SELECTED TAB </strong>(more simpler is to double click the object name in the
+        # 	Project Tab), <strong>SELECTED TAB </strong>will be updated with the object properties according to
+        # 	it&#39;s kind: Gerber, Excellon, Geometry or CNCJob object.<br />
+# 	<br />
+# 	If the selection of the object is done on the canvas by single click instead, and the <strong>SELECTED TAB</strong>
+        # 	is in focus, again the object properties will be displayed into the Selected Tab. Alternatively,
+        # 	double clicking on the object on the canvas will bring the <strong>SELECTED TAB</strong> and populate
+        # 	it even if it was out of focus.<br />
+# 	<br />
+# 	You can change the parameters in this screen and the flow direction is like this:<br />
+# 	<br />
+# 	<strong>Gerber/Excellon Object</strong> -&gt; Change Param -&gt; Generate Geometry -&gt;<strong> Geometry Object
+        # 	</strong>-&gt; Add tools (change param in Selected Tab) -&gt; Generate CNCJob -&gt;<strong> CNCJob Object
+        # 	</strong>-&gt; Verify GCode (through Edit CNC Code) and/or append/prepend to GCode (again, done in
+        # 	<strong>SELECTED TAB)&nbsp;</strong>-&gt; Save GCode</span></li>
+# </ol>
+#
+# <p><span style="font-size:{fsize}px">A list of key shortcuts is available through an menu entry in
+        # <strong>Help -&gt; Shortcuts List</strong>&nbsp;or through it&#39;s own key shortcut:
+        # <strong>F3</strong>.</span></p>
+#
+#         ''').format(fsize=fsize, tsize=tsize))
+
+        selected_text = '''
+        <p><span style="font-size:{tsize}px"><strong>%s</strong></span></p>
+
+        <p><span style="font-size:{fsize}px"><strong>%s</strong>:<br />
+        %s:</span></p>
+
+        <ol>
+            <li><span style="font-size:{fsize}px">%s menu&#39;s, %s.<br />
+            <br />
+            %s &amp; %s.</span><br />
+            &nbsp;</li>
+            <li><span style="font-size:{fsize}px">%s <strong>%s</strong> (%s), <strong>%s</strong> %s it-s %s.<br />
+            <br />
+            %s <strong>%s</strong> %s <strong>%s</strong> %s.<br />
+            <br />
+            %s:<br />
+            <br />
+            <strong>%s</strong> -&gt; %s -&gt; %s -&gt;<strong> %s </strong> -&gt; %s -&gt; %s -&gt;<strong> %s 
+            </strong>-&gt; %s <strong>%s)&nbsp;</strong>-&gt; %s</span></li>
+        </ol>
+
+        <p><span style="font-size:{fsize}px">%s <strong>%s -&gt; %s</strong>&nbsp;%s it&#39;s %s: 
+        <strong>F3</strong>.</span></p>
+        ''' % (
+            _("Selected Tab - Choose an Item from Project Tab"), _("Details"),
+            _("The normal flow when working in FlatCAM is the following"),
+            _("Load/Import a Gerber, Excellon, Gcode, DXF, Raster Image or SVG file into FlatCAM using either the"),
+            _("toolbars, key shortcuts or even dragging and dropping the files on the GUI"),
+            _("You can also load a FlatCAM project by double clicking on the project file, drag"),
+            _("drop of the file into the FLATCAM GUI or through the menu/toolbar links offered within the app"),
+            _("Once an object is available in the Project Tab, by selecting it and then focusing on"),
+            _("SELECTED TAB"), _("more simpler is to double click the object name in the Project Tab"),
+            _("SELECTED TAB"), _("will be updated with the object properties according to"),
+            _("kind: Gerber, Excellon, Geometry or CNCJob object"),
+            _("If the selection of the object is done on the canvas by single click instead, and the"),
+            _("SELECTED TAB"),
+            _("is in focus, again the object properties will be displayed into the Selected Tab. Alternatively, "
+              "double clicking on the object on the canvas will bring the"),
+            _("SELECTED TAB"), _("and populate it even if it was out of focus"),
+            _("You can change the parameters in this screen and the flow direction is like this"),
+            _("Gerber/Excellon Object"), _("Change Parameter"), _("Generate Geometry"), _("Geometry Object"),
+            _("Add tools (change param in Selected Tab)"), _("Generate CNCJob"), _("CNCJob Object"),
+            _("Verify GCode (through Edit CNC Code) and/or append/prepend to GCode (again, done in"), _("SELECTED TAB"),
+            _("Save GCode"), _("A list of key shortcuts is available through an menu entry in"), _("Help"),
+            _("Shortcuts List"), _("or through"), _("own key shortcut"),
+        )
 
         sel_title.setText(selected_text)
         sel_title.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)

+ 2 - 2
FlatCAMTranslation.py

@@ -89,8 +89,8 @@ def on_language_apply_click(app, restart=False):
     if restart:
         msgbox = QtWidgets.QMessageBox()
         msgbox.setText(_("The application will restart."))
-        msgbox.setInformativeText('$s %s?' % _("Are you sure do you want to change the current language to"),
-                                  name.capitalize())
+        msgbox.setInformativeText('%s %s?' %
+                                  (_("Are you sure do you want to change the current language to"), name.capitalize()))
         msgbox.setWindowTitle(_("Apply Language ..."))
         msgbox.setWindowIcon(QtGui.QIcon('share/language32.png'))
         bt_yes = msgbox.addButton(_("Yes"), QtWidgets.QMessageBox.YesRole)

+ 16 - 2
README.md

@@ -1,4 +1,4 @@
-FlatCAM: 2D Computer-Aided PCB Manufacturing
+latCAM: 2D Computer-Aided PCB Manufacturing
 =================================================
 
 (c) 2014-2019 Juan Pablo Caram
@@ -9,6 +9,20 @@ CAD program, and create G-Code for Isolation routing.
 
 =================================================
 
+14.09.2019
+
+- more string changes
+- updated translation files
+- fixed a small bug
+- minor changes in the Code Editor GUI
+- minor changes in the 'FlatCAM About' GUI
+- added a new shortcut key F5 for doing the 'Plot All'
+- updated the google-translated Spanish translation strings
+- fixed the layouts to include toolbars breaks where it was needed
+- whenever the user changes the Excellon format values for loading files, the Export Excellon Format values will be updated
+- made optional the behavior of Excellon Export values following the values in the Excellon Loading section
+- updated the translations (except RU) and the POT file
+
 13.09.2019
 
 - added control for simplification when loading a Gerber file in Preferences -> Gerber -> Gerber General -> Simplify
@@ -26,7 +40,7 @@ CAD program, and create G-Code for Isolation routing.
 
 12.09.2019
 
-- small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: tooldia
+- small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: diatol
 - cleaned up the 'About FlatCAM' window, started to give credits for the translation team
 - started to add an application splash screen
 - now, Excellon and Gerber edited objects will have the source_code updated and ready to be saved

+ 1 - 1
camlib.py

@@ -5664,7 +5664,7 @@ class CNCjob(Geometry):
         go to the nearest city.
 
         Even if this algorithm is extremely simple, it works pretty well
-        giving a solution only about 25% longer than the optimal one (cit. Wikipedia),
+        giving a solution only about 25%% longer than the optimal one (cit. Wikipedia),
         and runs very fast in O(N^2) time complexity.
 
         >>> optimized_travelling_salesman([[i,j] for i in range(5) for j in range(5)])

+ 1 - 1
flatcamEditors/FlatCAMGeoEditor.py

@@ -446,7 +446,7 @@ class PaintOptionsTool(FlatCAMTool):
         ovlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means 25% from the tool diameter found above.\n\n"
+              "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"

+ 35 - 22
flatcamGUI/FlatCAMGUI.py

@@ -599,6 +599,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.exc_edit_toolbar.setObjectName('ExcEditor_TB')
         self.addToolBar(self.exc_edit_toolbar)
 
+        self.addToolBarBreak()
+
         self.geo_edit_toolbar = QtWidgets.QToolBar(_('Geometry Editor Toolbar'))
         self.geo_edit_toolbar.setObjectName('GeoEditor_TB')
         self.addToolBar(self.geo_edit_toolbar)
@@ -1277,6 +1279,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                         <td height="20"><strong>F4</strong></td>
                         <td>&nbsp;%s</td>
                     </tr>
+                    <tr height="20">
+                        <td height="20"><strong>F5</strong></td>
+                        <td>&nbsp;%s</td>
+                    </tr>
                     <tr height="20">
                         <td height="20"><strong>Del</strong></td>
                         <td>&nbsp;%s</td>
@@ -1314,7 +1320,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
             _("Paint Area Tool"), _("PDF Import Tool"), _("Transformations Tool"), _("View File Source"),
             _("Cutout PCB Tool"), _("Enable all Plots"), _("Disable all Plots"), _("Disable Non-selected Plots"),
             _("Toggle Full Screen"), _("Abort current task (gracefully)"), _("Open Online Manual"),
-            _("Open Online Tutorials"), _("Delete Object"), _("Alternate: Delete Tool"),
+            _("Open Online Tutorials"), _("Refresh Plots"), _("Delete Object"), _("Alternate: Delete Tool"),
             _("(left to Key_1)Toogle Notebook Area (Left Side)"), _("En(Dis)able Obj Plot"), _("Deselects all objects")
         )
         )
@@ -1483,7 +1489,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
             _("Within Add Arc will toogle the ARC direction: CW or CCW"), _("Polygon Intersection Tool"),
             _("Geo Paint Tool"), _("Jump to Location (x, y)"), _("Toggle Corner Snap"), _("Move Geo Item"),
             _("Within Add Arc will cycle through the ARC modes"), _("Draw a Polygon"), _("Draw a Circle"),
-            _("Draw a Path"), _("Draw Rectangle"), _("Polygon Substraction Tool"), _("Add Text Tool"),
+            _("Draw a Path"), _("Draw Rectangle"), _("Polygon Subtraction Tool"), _("Add Text Tool"),
             _("Polygon Union Tool"), _("Flip shape on X axis"), _("Flip shape on Y axis"), _("Skew shape on X axis"),
             _("Skew shape on Y axis"), _("Editor Transformation Tool"), _("Offset shape on X axis"),
             _("Offset shape on Y axis"), _("Measurement Tool"), _("Save Object and Exit Editor"), _("Polygon Cut Tool"),
@@ -1821,7 +1827,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
         self.entryFind = FCEntry()
         self.entryFind.setToolTip(_("Find box. Enter here the strings to be searched in the text."))
-        self.entryFind.setMaximumWidth(200)
 
         self.buttonReplace = QtWidgets.QPushButton(_('Replace With'))
         self.buttonReplace.setToolTip(_("Will replace the string from the Find box with the one in the Replace box."))
@@ -1829,13 +1834,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.buttonReplace.setMinimumWidth(100)
         self.entryReplace = FCEntry()
         self.entryReplace.setToolTip(_("String to replace the one in the Find box throughout the text."))
-        self.entryReplace.setMaximumWidth(200)
 
         self.sel_all_cb = QtWidgets.QCheckBox(_('All'))
-        self.sel_all_cb.setToolTip(
-            _("When checked it will replace all instances in the 'Find' box\n"
-              "with the text in the 'Replace' box..")
-        )
+        self.sel_all_cb.setToolTip(_("When checked it will replace all instances in the 'Find' box\n"
+                                     "with the text in the 'Replace' box.."))
+
         self.buttonOpen = QtWidgets.QPushButton(_('Open Code'))
         self.buttonOpen.setToolTip(_("Will open a text file in the editor."))
 
@@ -1849,13 +1852,13 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.cncjob_tab_layout.addWidget(self.code_editor, 0, 0, 1, 5)
 
         cnc_tab_lay_1 = QtWidgets.QHBoxLayout()
-        cnc_tab_lay_1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
+        # cnc_tab_lay_1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
         cnc_tab_lay_1.addWidget(self.buttonFind)
         cnc_tab_lay_1.addWidget(self.entryFind)
         cnc_tab_lay_1.addWidget(self.buttonReplace)
         cnc_tab_lay_1.addWidget(self.entryReplace)
         cnc_tab_lay_1.addWidget(self.sel_all_cb)
-        self.cncjob_tab_layout.addLayout(cnc_tab_lay_1, 1, 0, 1, 1, QtCore.Qt.AlignLeft)
+        self.cncjob_tab_layout.addLayout(cnc_tab_lay_1, 1, 0, 1, 5)
 
         cnc_tab_lay_3 = QtWidgets.QHBoxLayout()
         cnc_tab_lay_3.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
@@ -2227,11 +2230,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         if settings.contains("layout"):
             layout = settings.value('layout', type=str)
             if layout == 'standard':
-                self.exc_edit_toolbar.setVisible(False)
+                self.exc_edit_toolbar.setVisible(True)
                 self.exc_edit_toolbar.setDisabled(True)
-                self.geo_edit_toolbar.setVisible(False)
+                self.geo_edit_toolbar.setVisible(True)
                 self.geo_edit_toolbar.setDisabled(True)
-                self.grb_edit_toolbar.setVisible(False)
+                self.grb_edit_toolbar.setVisible(True)
                 self.grb_edit_toolbar.setDisabled(True)
 
                 self.corner_snap_btn.setVisible(False)
@@ -2442,6 +2445,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 if key == QtCore.Qt.Key_F4 or key == 'F4':
                     webbrowser.open(self.app.video_url)
 
+                # Open Video Help
+                if key == QtCore.Qt.Key_F5 or key == 'F5':
+                    self.app.plot_all()
+
                 # Switch to Project Tab
                 if key == QtCore.Qt.Key_1:
                     self.app.on_select_tab('project')
@@ -4515,7 +4522,7 @@ class GerberOptPrefGroupUI(OptionsGroupUI):
         overlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means an overlap of 25% from the tool diameter found above.")
+              "A value here of 0.25 means an overlap of 25%% from the tool diameter found above.")
         )
         grid0.addWidget(overlabel, 2, 0)
         self.iso_overlap_entry = FloatEntry()
@@ -5130,10 +5137,16 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
         )
         grid2.addWidget(self.excellon_units_radio, 1, 1)
 
-        grid2.addWidget(QtWidgets.QLabel(""), 2, 0)
+        self.update_excellon_cb = FCCheckBox(label=_('Update Export settings'))
+        self.update_excellon_cb.setToolTip(
+            "If checked, the Excellon Export settings will be updated with the ones above."
+        )
+        grid2.addWidget(self.update_excellon_cb, 2, 0)
+
+        grid2.addWidget(QtWidgets.QLabel(""), 3, 0)
 
         self.excellon_general_label = QtWidgets.QLabel("<b>%s:</b>" % _("Excellon Optimization"))
-        grid2.addWidget(self.excellon_general_label, 3, 0, 1, 2)
+        grid2.addWidget(self.excellon_general_label, 4, 0, 1, 2)
 
         self.excellon_optimization_label = QtWidgets.QLabel(_('Algorithm:   '))
         self.excellon_optimization_label.setToolTip(
@@ -5146,7 +5159,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
               "If DISABLED, then FlatCAM works in 32bit mode and it uses \n"
               "Travelling Salesman algorithm for path optimization.")
         )
-        grid2.addWidget(self.excellon_optimization_label, 4, 0)
+        grid2.addWidget(self.excellon_optimization_label, 5, 0)
 
         self.excellon_optimization_radio = RadioSet([{'label': _('MH'), 'value': 'M'},
                                                      {'label': _('Basic'), 'value': 'B'}])
@@ -5160,7 +5173,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
               "If DISABLED, then FlatCAM works in 32bit mode and it uses \n"
               "Travelling Salesman algorithm for path optimization.")
         )
-        grid2.addWidget(self.excellon_optimization_radio, 4, 1)
+        grid2.addWidget(self.excellon_optimization_radio, 5, 1)
 
         self.optimization_time_label = QtWidgets.QLabel('%s:' % _('Optimization Time'))
         self.optimization_time_label.setAlignment(QtCore.Qt.AlignLeft)
@@ -5171,11 +5184,11 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
               "In seconds.")
 
         )
-        grid2.addWidget(self.optimization_time_label, 5, 0)
+        grid2.addWidget(self.optimization_time_label, 6, 0)
 
         self.optimization_time_entry = IntEntry()
         self.optimization_time_entry.setValidator(QtGui.QIntValidator(0, 999))
-        grid2.addWidget(self.optimization_time_entry, 5, 1)
+        grid2.addWidget(self.optimization_time_entry, 6, 1)
 
         current_platform = platform.architecture()[0]
         if current_platform == '64bit':
@@ -6684,7 +6697,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
         nccoverlabel.setToolTip(
            _("How much (fraction) of the tool width to overlap each tool pass.\n"
              "Example:\n"
-             "A value here of 0.25 means 25% from the tool diameter found above.\n\n"
+             "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
              "Adjust the value starting with lower values\n"
              "and increasing it if areas that should be cleared are still \n"
              "not cleared.\n"
@@ -7029,7 +7042,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
         ovlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means 25% from the tool diameter found above.\n\n"
+              "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"

+ 1 - 1
flatcamGUI/ObjectUI.py

@@ -289,7 +289,7 @@ class GerberObjectUI(ObjectUI):
         overlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means an overlap of 25% from the tool diameter found above.")
+              "A value here of 0.25 means an overlap of 25%% from the tool diameter found above.")
         )
         overlabel.setMinimumWidth(90)
         self.iso_overlap_entry = FloatEntry()

+ 1 - 1
flatcamTools/ToolNonCopperClear.py

@@ -284,7 +284,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
         nccoverlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means 25% from the tool diameter found above.\n\n"
+              "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be cleared are still \n"
               "not cleared.\n"

+ 1 - 1
flatcamTools/ToolPaint.py

@@ -206,7 +206,7 @@ class ToolPaint(FlatCAMTool, Gerber):
         ovlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
               "Example:\n"
-              "A value here of 0.25 means 25% from the tool diameter found above.\n\n"
+              "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"

BIN
locale/de/LC_MESSAGES/strings.mo


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


BIN
locale/en/LC_MESSAGES/strings.mo


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


BIN
locale/es/LC_MESSAGES/strings.mo


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


BIN
locale/pt_BR/LC_MESSAGES/strings.mo


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


BIN
locale/ro/LC_MESSAGES/strings.mo


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


Разница между файлами не показана из-за своего большого размера
+ 215 - 215
locale_template/strings.pot


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