mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 21:50:37 +02:00
- measurements entered through the GUI were connected to the active frame, not
the root frame git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5420 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
fe5f824b9e
commit
3064b2abbb
@ -269,7 +269,8 @@ static int end_new_meas(struct inst *from, struct inst *to)
|
||||
if (from == to)
|
||||
return 0;
|
||||
/* it's safe to pass "from" here, but we may change it later */
|
||||
obj = new_obj(ot_meas, from);
|
||||
obj = new_obj_unconnected(ot_meas, from);
|
||||
connect_obj(root_frame, obj);
|
||||
meas = &obj->u.meas;
|
||||
meas->label = NULL;
|
||||
switch (mode) {
|
||||
|
23
gui_tool.c
23
gui_tool.c
@ -83,9 +83,9 @@ static struct vec *new_vec(struct inst *base)
|
||||
}
|
||||
|
||||
|
||||
struct obj *new_obj(enum obj_type type, struct inst *base)
|
||||
struct obj *new_obj_unconnected(enum obj_type type, struct inst *base)
|
||||
{
|
||||
struct obj *obj, **walk;
|
||||
struct obj *obj;
|
||||
|
||||
obj = alloc_type(struct obj);
|
||||
obj->type = type;
|
||||
@ -93,8 +93,25 @@ struct obj *new_obj(enum obj_type type, struct inst *base)
|
||||
obj->base = inst_get_vec(base);
|
||||
obj->next = NULL;
|
||||
obj->lineno = 0;
|
||||
for (walk = &active_frame->objs; *walk; walk = &(*walk)->next);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
void connect_obj(struct frame *frame, struct obj *obj)
|
||||
{
|
||||
struct obj **walk;
|
||||
|
||||
for (walk = &frame->objs; *walk; walk = &(*walk)->next);
|
||||
*walk = obj;
|
||||
}
|
||||
|
||||
|
||||
static struct obj *new_obj(enum obj_type type, struct inst *base)
|
||||
{
|
||||
struct obj *obj;
|
||||
|
||||
obj = new_obj_unconnected(type, base);
|
||||
connect_obj(active_frame, obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,8 @@ void tool_redraw(void);
|
||||
* compilation unit.
|
||||
*/
|
||||
|
||||
struct obj *new_obj(enum obj_type type, struct inst *base);
|
||||
struct obj *new_obj_unconnected(enum obj_type type, struct inst *base);
|
||||
void connect_obj(struct frame *frame, struct obj *obj);
|
||||
struct pix_buf *draw_move_line_common(struct inst *inst,
|
||||
struct coord end, struct coord pos, int i);
|
||||
struct pix_buf *drag_new_line(struct inst *from, struct coord to);
|
||||
|
Loading…
Reference in New Issue
Block a user