From 1a4fa4317ab9648044308cd307cc23dbfa5c7718 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 25 May 2020 04:46:03 +0300 Subject: [PATCH] - added a Toggle All checkbox to Corner Markers Tool - added an Icon to the MessageBox that asks for saving if the user try to close the app and there is some unsaved work --- AppTools/ToolCorners.py | 19 ++++++++++++++++++- AppTools/ToolEtchCompensation.py | 2 +- App_Main.py | 2 ++ CHANGELOG.md | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/AppTools/ToolCorners.py b/AppTools/ToolCorners.py index 8ac4dd91..e91652b2 100644 --- a/AppTools/ToolCorners.py +++ b/AppTools/ToolCorners.py @@ -97,6 +97,15 @@ class ToolCorners(AppTool): separator_line.setFrameShadow(QtWidgets.QFrame.Sunken) self.layout.addWidget(separator_line) + # Toggle ALL + self.toggle_all_cb = FCCheckBox(_("Toggle ALL")) + self.layout.addWidget(self.toggle_all_cb) + + separator_line = QtWidgets.QFrame() + separator_line.setFrameShape(QtWidgets.QFrame.HLine) + separator_line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.layout.addWidget(separator_line) + # ## Grid Layout grid_lay = QtWidgets.QGridLayout() self.layout.addLayout(grid_lay) @@ -195,6 +204,7 @@ class ToolCorners(AppTool): # SIGNALS self.add_marker_button.clicked.connect(self.add_markers) + self.toggle_all_cb.toggled.connect(self.on_toggle_all) def run(self, toggle=True): self.app.defaults.report_usage("ToolCorners()") @@ -232,6 +242,13 @@ class ToolCorners(AppTool): self.thick_entry.set_value(self.app.defaults["tools_corners_thickness"]) self.l_entry.set_value(float(self.app.defaults["tools_corners_length"])) self.margin_entry.set_value(float(self.app.defaults["tools_corners_margin"])) + self.toggle_all_cb.set_value(False) + + def on_toggle_all(self, val): + self.bl_cb.set_value(val) + self.br_cb.set_value(val) + self.tl_cb.set_value(val) + self.tr_cb.set_value(val) def add_markers(self): self.app.call_source = "corners_tool" @@ -367,7 +384,7 @@ class ToolCorners(AppTool): g_obj.apertures[new_apid]['geometry'] = [] for geo in geo_list: - geo_buff = geo.buffer(line_thickness / 2.0, resolution=self.grb_steps_per_circle, join_style=2) + geo_buff = geo.buffer(line_thickness / 2.0, resolution=self.grb_steps_per_circle, join_style=3) geo_buff_list.append(geo_buff) dict_el = {} diff --git a/AppTools/ToolEtchCompensation.py b/AppTools/ToolEtchCompensation.py index 7bb80c8e..e41e46be 100644 --- a/AppTools/ToolEtchCompensation.py +++ b/AppTools/ToolEtchCompensation.py @@ -169,7 +169,7 @@ class ToolEtchCompensation(AppTool): ) self.etchants_combo = FCComboBox(callback=self.confirmation_message) self.etchants_combo.setObjectName(_("Etchants")) - self.etchants_combo.addItems(["CuCl2", "FeCl3"]) + self.etchants_combo.addItems(["CuCl2", "Fe3Cl"]) grid0.addWidget(self.etchants_label, 18, 0) grid0.addWidget(self.etchants_combo, 18, 1) diff --git a/App_Main.py b/App_Main.py index dff63a99..e161d83a 100644 --- a/App_Main.py +++ b/App_Main.py @@ -3040,6 +3040,8 @@ class App(QtCore.QObject): "Do you want to Save the project?")) msgbox.setWindowTitle(_("Save changes")) msgbox.setWindowIcon(QtGui.QIcon(self.resource_location + '/save_as.png')) + msgbox.setIcon(QtWidgets.QMessageBox.Question) + bt_yes = msgbox.addButton(_('Yes'), QtWidgets.QMessageBox.YesRole) bt_no = msgbox.addButton(_('No'), QtWidgets.QMessageBox.NoRole) bt_cancel = msgbox.addButton(_('Cancel'), QtWidgets.QMessageBox.RejectRole) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc5ab7b1..faa7a376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ CHANGELOG for FlatCAM beta - updated the GUI fields for the Scale and Offset in the Object UI to allow only numeric values and operators in the list [/,*,+,-], spaces, dots and comma - modified the Etch Compensation Tool and added conversion utilities from Oz thickenss and mils to microns +- added a Toggle All checkbox to Corner Markers Tool +- added an Icon to the MessageBox that asks for saving if the user try to close the app and there is some unsaved work 24.05.2020