diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-10-13 23:45:18 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-10-13 23:45:18 +0200 |
commit | f663680514da83368464df0020d9c2e04ef770c8 (patch) | |
tree | bd93db3eb900665e6a07c1edb1e4186798f62c18 /src/tool_select.c | |
parent | 2e0f09d78f28c576d9a10dfcd1eeaae81e3baa07 (diff) |
Check object type before asking the tool to do things
Diffstat (limited to 'src/tool_select.c')
-rw-r--r-- | src/tool_select.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tool_select.c b/src/tool_select.c index a3a8c39..2327d0d 100644 --- a/src/tool_select.c +++ b/src/tool_select.c @@ -130,6 +130,12 @@ static void im_commit(struct object *o, gchar *str, struct toolinfo *tip) } +static int valid_object(struct object *o) +{ + return 1; +} + + struct toolinfo *initialise_select_tool() { struct select_toolinfo *ti; @@ -146,6 +152,7 @@ struct toolinfo *initialise_select_tool() ti->base.draw_editing_overlay = draw_overlay; ti->base.key_pressed = key_pressed; ti->base.im_commit = im_commit; + ti->base.valid_object = valid_object; return (struct toolinfo *)ti; } |