1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

When no instance is selected, show the polar coordinates of the current

pointer position relative to the user origin in the radius/angle fields.
This helps to make quick manual measurements, e.g., of clearances.

This also fixes the following bug:
- gui_canvas.c (refresh_pos): showed canvas coordinates instead of model
  coordinates



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5755 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-12-15 19:33:15 +00:00
parent 2a819a82d7
commit a830226830
6 changed files with 42 additions and 9 deletions

7
inst.c
View File

@@ -23,6 +23,7 @@
#include "delete.h"
#include "gui_util.h"
#include "gui_status.h"
#include "gui_canvas.h"
#include "gui_tool.h"
#include "gui_meas.h"
#include "gui_inst.h"
@@ -394,6 +395,7 @@ void inst_deselect(void)
status_set_angle("");
selected_inst = NULL;
edit_nothing();
refresh_pos();
}
@@ -449,15 +451,14 @@ static void rect_status(struct coord a, struct coord b, unit_type width,
int rounded)
{
struct coord d = sub_vec(b, a);
double angle, r;
double r;
unit_type diag;
status_set_xy(d);
if (!d.x && !d.y)
status_set_angle("a = 0 deg");
else {
angle = theta(a, b);
status_set_angle("a = %3.1f deg", angle);
status_set_angle("a = %3.1f deg", theta(a, b));
}
if (d.x < 0)
d.x = -d.x;