From: Mikko Rasa Date: Thu, 21 Nov 2013 15:04:25 +0000 (+0200) Subject: Add button_release handler to Tool X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e37f7bfbbee86eef3b1f6e338a21239905911608;p=r2c2.git Add button_release handler to Tool --- diff --git a/source/designer/tool.cpp b/source/designer/tool.cpp index 83ac15d..249259e 100644 --- a/source/designer/tool.cpp +++ b/source/designer/tool.cpp @@ -15,6 +15,7 @@ Tool::Tool(Designer &d, Input::Keyboard &keyboard, Input::Mouse &mouse): keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Tool::key_press), false)); keyboard.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &Tool::key_release), false)); mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Tool::button_press), false)); + mouse.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &Tool::button_release), false)); mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Tool::axis_motion), false)); pointer.x = mouse.get_axis_value(0); diff --git a/source/designer/tool.h b/source/designer/tool.h index 3119bc0..48780ec 100644 --- a/source/designer/tool.h +++ b/source/designer/tool.h @@ -42,6 +42,7 @@ protected: virtual void key_press(unsigned); virtual void key_release(unsigned); virtual void button_press(unsigned); + virtual void button_release(unsigned) { } virtual void axis_motion(unsigned, float, float); virtual void pointer_motion() { } virtual void finish() { }