mirror of
git://projects.qi-hardware.com/fped.git
synced 2025-04-21 12:27:27 +03:00
Made life in mil-land a little less painful.
- .fpd file format: new directive "unit" to set the default unit - new selection was too aggressive - make it only rearrange settings if we also fail the second vector search - gui_draw_pad_text: calculation of height vs. width lost too much precision, causing pad text to be rotated arbitrarily - drag_new_vec: display distance in mil if unit is mil - end_new_raw_vec: store distance in mil if unit is mil - gridify: use a 10 mil grid if unit is mil - ps_hline: corrected gsave/grestore mismatch - Makefile: made "all" a prerequisite of "install" - Postscript output now mentions the default unit (if set) - ps_package: height and width were swapped, oopsie ! git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5525 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
40
inst.c
40
inst.c
@@ -208,6 +208,26 @@ int inst_select(struct coord pos)
|
||||
if (selected_inst)
|
||||
goto selected;
|
||||
}
|
||||
|
||||
/* give vectors a second chance */
|
||||
|
||||
if (show_stuff) {
|
||||
FOR_ALL_INSTS(i, ip_vec, inst) {
|
||||
if (!inst->active)
|
||||
continue;
|
||||
if (!inst_connected(inst))
|
||||
continue;
|
||||
dist = gui_dist_vec_fallback(inst, pos, draw_ctx.scale);
|
||||
if (dist >= 0 && (!selected_inst || best_dist > dist)) {
|
||||
selected_inst = inst;
|
||||
best_dist = dist;
|
||||
}
|
||||
}
|
||||
|
||||
if (selected_inst)
|
||||
goto selected;
|
||||
}
|
||||
|
||||
if (any_same_frame) {
|
||||
if (activate_item(any_same_frame))
|
||||
return inst_select(pos);
|
||||
@@ -220,25 +240,7 @@ int inst_select(struct coord pos)
|
||||
}
|
||||
}
|
||||
|
||||
if (!show_stuff)
|
||||
return 0;
|
||||
|
||||
/* give vectors a second chance */
|
||||
|
||||
FOR_ALL_INSTS(i, ip_vec, inst) {
|
||||
if (!inst->active)
|
||||
continue;
|
||||
if (!inst_connected(inst))
|
||||
continue;
|
||||
dist = gui_dist_vec_fallback(inst, pos, draw_ctx.scale);
|
||||
if (dist >= 0 && (!selected_inst || best_dist > dist)) {
|
||||
selected_inst = inst;
|
||||
best_dist = dist;
|
||||
}
|
||||
}
|
||||
|
||||
if (!selected_inst)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
selected:
|
||||
inst_select_inst(selected_inst);
|
||||
|
||||
Reference in New Issue
Block a user