aboutsummaryrefslogtreecommitdiff
path: root/src/tool_select.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-10-13 23:45:18 +0200
committerThomas White <taw@bitwiz.org.uk>2011-10-13 23:45:18 +0200
commitf663680514da83368464df0020d9c2e04ef770c8 (patch)
treebd93db3eb900665e6a07c1edb1e4186798f62c18 /src/tool_select.c
parent2e0f09d78f28c576d9a10dfcd1eeaae81e3baa07 (diff)
Check object type before asking the tool to do things
Diffstat (limited to 'src/tool_select.c')
-rw-r--r--src/tool_select.c7
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;
}