diff options
-rw-r--r-- | src/canvasselect.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/canvasselect.c b/src/canvasselect.c index 53a2a8f..7d0cf12 100644 --- a/src/canvasselect.c +++ b/src/canvasselect.c @@ -41,9 +41,18 @@ typedef struct _canvasselect static void canvasselect_bang(t_canvasselect *x) { /* get the selection of the canvas */ + t_glist*glist=x->x_canvas; + t_gobj*obj=NULL; + int index=0; - - + if(NULL==glist) { + return; + } + for(obj=glist->gl_list; obj; obj=obj->g_next, index++) { + if(glist_isselected(glist, obj)) { + post("selected: %d", index); + } + } } @@ -64,8 +73,9 @@ static int canvasselect_doselect(t_glist*glist, int index) obj=obj->g_next; } - if(obj) + if(obj) { glist_select(glist, obj); + } else { return -1; } |