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

- band-aid: make canvas grab focus on click and scroll, so that it's easy to

get it back when we lose it
- improved heuristics for measx/measy: instead of looking for "next" or "max"
  on secondary coordinate, pick the one that's closest. I.e., if there's a
  chance to just connect with x' = 0 or y' = 0, do it.
- mouse wheel on loop value now selects next/previous value
- corrected proximity calculation for measurements
- vec/frame/meas toggle now deselects, so that we don't accidently leave a
  supposedly hidden item selected



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5413 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-09 01:51:20 +00:00
parent 4a0fd61016
commit 75d9780131
12 changed files with 160 additions and 47 deletions
+11 -1
View File
@@ -23,6 +23,7 @@
#include "gui_util.h"
#include "gui_status.h"
#include "gui_tool.h"
#include "gui_meas.h"
#include "gui_inst.h"
#include "gui.h"
#include "inst.h"
@@ -37,9 +38,10 @@ struct inst_ops {
unit_type scale);
void (*select)(struct inst *self);
int (*anchors)(struct inst *self, struct vec ***anchors);
void (*begin_drag_move)(struct inst *from, int i);
struct pix_buf *(*draw_move)(struct inst *inst,
struct coord pos, int i);
/* arcs need this special override */
/* arcs and measurements need this special override */
void (*do_move_to)(struct inst *inst, struct vec *vec, int i);
};
@@ -689,6 +691,7 @@ static struct inst_ops meas_ops = {
.distance = gui_dist_meas,
.select = meas_op_select,
.anchors = meas_op_anchors,
.begin_drag_move= begin_drag_move_meas,
.draw_move = draw_move_meas,
};
@@ -925,6 +928,13 @@ struct pix_buf *inst_hover(struct inst *inst)
}
void inst_begin_drag_move(struct inst *inst, int i)
{
if (inst->ops->begin_drag_move)
inst->ops->begin_drag_move(inst, i);
}
void inst_delete(struct inst *inst)
{
if (inst->ops == &vec_ops)