- in Distance Plugin, after setting the start point of the measurement, moving the mouse will update the end point position
This commit is contained in:
committed by
Marius Stanciu
parent
114e761b35
commit
a33fabdd6f
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
|
||||
|
||||
=================================================
|
||||
|
||||
11.10.2021
|
||||
|
||||
- in Distance Plugin, after setting the start point of the measurement, moving the mouse will update the end point position
|
||||
|
||||
10.10.2021
|
||||
|
||||
- in Markers Plugin replaced the Margin parameters with the Offset parameters that now can be referenced either to the edge of the bounding box (effectively replacing the old Margin parameter) or to the center of the bounding box
|
||||
|
||||
@@ -319,7 +319,7 @@ class Distance(AppTool):
|
||||
# mouse click releases will be accepted only if the left button is clicked
|
||||
# this is necessary because right mouse click or middle mouse click
|
||||
# are used for panning on the canvas
|
||||
log.debug("Distance Tool --> mouse click release")
|
||||
# log.debug("Distance Tool --> mouse click release")
|
||||
|
||||
if self.app.is_legacy is False:
|
||||
event_pos = event.pos
|
||||
@@ -517,10 +517,16 @@ class Distance(AppTool):
|
||||
angle = math.degrees(math.atan2(dy, dx))
|
||||
if angle < 0:
|
||||
angle += 360
|
||||
self.ui.angle_entry.set_value('%.*f' % (self.decimals, angle))
|
||||
self.ui.angle_entry.set_value(str(self.app.dec_format(angle, self.decimals)))
|
||||
except Exception as e:
|
||||
log.error("Distance.on_mouse_move_meas() -> update utility geometry -> %s" % str(e))
|
||||
pass
|
||||
# update the end point value
|
||||
end_val = (
|
||||
self.app.dec_format(pos[0], self.decimals),
|
||||
self.app.dec_format(pos[1], self.decimals)
|
||||
)
|
||||
self.ui.stop_entry.set_value(str(end_val))
|
||||
|
||||
except Exception as e:
|
||||
log.error("Distance.on_mouse_move_meas() --> %s" % str(e))
|
||||
|
||||
Reference in New Issue
Block a user