]> git.tdb.fi Git - r2c2.git/commitdiff
Add button_release handler to Tool
authorMikko Rasa <tdb@tdb.fi>
Thu, 21 Nov 2013 15:04:25 +0000 (17:04 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 21 Nov 2013 15:04:25 +0000 (17:04 +0200)
source/designer/tool.cpp
source/designer/tool.h

index 83ac15d731c7856c53db14bccc9edd6cf1e0f37c..249259ecae2bb6d5da9a0f80f774ef93bc2dcf15 100644 (file)
@@ -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);
index 3119bc0327ce715dedf00f76bbcbc399e9b6213d..48780ec48208045798f9c8201336eb336612a1a3 100644 (file)
@@ -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() { }