From b2261774482689f5ebdce672a8b3d9cd5c403a8f Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 30 Sep 2019 04:58:26 +0300 Subject: [PATCH] - in Tool Distance and Tool Minimal Distance made the entry fields read-only --- README.md | 1 + flatcamTools/ToolDistance.py | 6 ++++++ flatcamTools/ToolDistanceMin.py | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 0fc40ea5..db6a47e6 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ CAD program, and create G-Code for Isolation routing. - small change in the UI layout for Check Rules Tool by adding a new rule (Check trace size) - changed a tooltip in Optimal Tool - in Optimal Tool added display of how frequent that minimum distance is found +- in Tool Distance and Tool Minimal Distance made the entry fields read-only 29.09.2019 diff --git a/flatcamTools/ToolDistance.py b/flatcamTools/ToolDistance.py index 99d17cc1..ce4c772b 100644 --- a/flatcamTools/ToolDistance.py +++ b/flatcamTools/ToolDistance.py @@ -64,26 +64,32 @@ class Distance(FlatCAMTool): self.total_distance_label.setToolTip(_("This is the point to point Euclidian distance.")) self.start_entry = FCEntry() + self.start_entry.setReadOnly(True) self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.start_entry.setToolTip(_("This is measuring Start point coordinates.")) self.stop_entry = FCEntry() + self.stop_entry.setReadOnly(True) self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.stop_entry.setToolTip(_("This is the measuring Stop point coordinates.")) self.distance_x_entry = FCEntry() + self.distance_x_entry.setReadOnly(True) self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis.")) self.distance_y_entry = FCEntry() + self.distance_y_entry.setReadOnly(True) self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis.")) self.angle_entry = FCEntry() + self.angle_entry.setReadOnly(True) self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.angle_entry.setToolTip(_("This is orientation angle of the measuring line.")) self.total_distance_entry = FCEntry() + self.total_distance_entry.setReadOnly(True) self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.total_distance_entry.setToolTip(_("This is the point to point Euclidian distance.")) diff --git a/flatcamTools/ToolDistanceMin.py b/flatcamTools/ToolDistanceMin.py index a4153813..e1b3f617 100644 --- a/flatcamTools/ToolDistanceMin.py +++ b/flatcamTools/ToolDistanceMin.py @@ -71,32 +71,39 @@ class DistanceMin(FlatCAMTool): self.half_point_label.setToolTip(_("This is the middle point of the point to point Euclidean distance.")) self.start_entry = FCEntry() + self.start_entry.setReadOnly(True) self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.start_entry.setToolTip(_("This is first object point coordinates.\n" "This is the start point for measuring distance.")) self.stop_entry = FCEntry() + self.stop_entry.setReadOnly(True) self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.stop_entry.setToolTip(_("This is second object point coordinates.\n" "This is the end point for measuring distance.")) self.distance_x_entry = FCEntry() + self.distance_x_entry.setReadOnly(True) self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis.")) self.distance_y_entry = FCEntry() + self.distance_y_entry.setReadOnly(True) self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis.")) self.angle_entry = FCEntry() + self.angle_entry.setReadOnly(True) self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.angle_entry.setToolTip(_("This is orientation angle of the measuring line.")) self.total_distance_entry = FCEntry() + self.total_distance_entry.setReadOnly(True) self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.total_distance_entry.setToolTip(_("This is the point to point Euclidean distance.")) self.half_point_entry = FCEntry() + self.half_point_entry.setReadOnly(True) self.half_point_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) self.half_point_entry.setToolTip(_("This is the middle point of the point to point Euclidean distance."))