From c0b3f6ebde333aeab335143c613dd56a05918364 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 30 Mar 2022 17:41:22 +0300 Subject: [PATCH] - some minor changes in Distance Plugin - when changing workspace orientation fixed leaving behind the old frame on the cavnas --- CHANGELOG.md | 2 ++ appGUI/PlotCanvas.py | 1 + appPlugins/ToolDistance.py | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3099a14c..4e8f2684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ CHANGELOG for FlatCAM Evo beta - the HUD display is no longer default active on new installations - in Distance Plugin: added a new way to display the angle (angles between 181° and 359° are subtracted from 360°) - in Distance Plugin: "snap to center" feature now works outside the Editors too (for Gerber object pads and Excellon object drill holes) +- some minor changes in Distance Plugin +- when changing workspace orientation fixed leaving behind the old frame on the cavnas 29.03.2022 diff --git a/appGUI/PlotCanvas.py b/appGUI/PlotCanvas.py index c130440e..40d018c8 100644 --- a/appGUI/PlotCanvas.py +++ b/appGUI/PlotCanvas.py @@ -418,6 +418,7 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): :param workspace_size: the workspace size; tuple :return: """ + self.delete_workspace() try: if self.fcapp.app_units.upper() == 'MM': dims = self.pagesize_dict[workspace_size] diff --git a/appPlugins/ToolDistance.py b/appPlugins/ToolDistance.py index 8c0fe67a..51d1c38e 100644 --- a/appPlugins/ToolDistance.py +++ b/appPlugins/ToolDistance.py @@ -205,6 +205,7 @@ class Distance(AppTool): self.display_start((0.0, 0.0)) self.display_end((0.0, 0.0)) self.ui.angle_entry.set_value('%.*f' % (self.decimals, 0.0)) + self.ui.angle2_entry.set_value('%.*f' % (self.decimals, 0.0)) self.ui.distance_x_entry.set_value('%.*f' % (self.decimals, 0.0)) self.ui.distance_y_entry.set_value('%.*f' % (self.decimals, 0.0)) self.ui.total_distance_entry.set_value('%.*f' % (self.decimals, 0.0)) @@ -560,6 +561,8 @@ class Distance(AppTool): self.ui.distance_y_entry.setDisabled(True) self.ui.angle_label.setDisabled(True) self.ui.angle_entry.setDisabled(True) + self.ui.angle2_label.setDisabled(True) + self.ui.angle2_entry.setDisabled(True) else: self.ui.distance_x_label.setDisabled(False) self.ui.distance_x_entry.setDisabled(False) @@ -567,6 +570,8 @@ class Distance(AppTool): self.ui.distance_y_entry.setDisabled(False) self.ui.angle_label.setDisabled(False) self.ui.angle_entry.setDisabled(False) + self.ui.angle2_label.setDisabled(False) + self.ui.angle2_entry.setDisabled(False) def on_cursor_change(self, val): if val: