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

Added delete/undelete.

- when moving a point, we no longer restrict the area around the original
  position once the drag radius has been left
- objects can now be deleted by selecting them and pressing Delete
- deleted objects can be restored by pressing "u"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5387 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-05 00:32:38 +00:00
parent 5d7ab083a3
commit 3db91b5c1b
11 changed files with 365 additions and 13 deletions

10
obj.c
View File

@@ -33,7 +33,7 @@ struct frame *active_frame = NULL;
static int generate_frame(struct frame *frame, struct coord base,
const struct frame *parent, int active);
const struct frame *parent, struct obj *frame_ref, int active);
static struct num eval_unit(const struct expr *expr, const struct frame *frame)
@@ -93,7 +93,7 @@ static int generate_objs(struct frame *frame, struct coord base, int active)
switch (obj->type) {
case ot_frame:
if (!generate_frame(obj->u.frame.ref,
obj->base ? obj->base->pos : base, frame,
obj->base ? obj->base->pos : base, frame, obj,
active && obj->u.frame.ref->active_ref == obj))
return 0;
break;
@@ -237,14 +237,14 @@ static int iterate_tables(struct frame *frame, struct table *table,
static int generate_frame(struct frame *frame, struct coord base,
const struct frame *parent, int active)
const struct frame *parent, struct obj *frame_ref, int active)
{
int ok;
/*
* We ensure during construction that frames can never recurse.
*/
inst_begin_frame(frame, base,
inst_begin_frame(frame_ref, frame, base,
active && parent == active_frame,
active && frame == active_frame);
frame->curr_parent = parent;
@@ -260,7 +260,7 @@ int instantiate(void)
int ok;
inst_start();
ok = generate_frame(root_frame, zero, NULL, 1);
ok = generate_frame(root_frame, zero, NULL, NULL, 1);
if (ok)
inst_commit();
else