From 5a838eb403143abf75ffed2f3b32c470b979d16f Mon Sep 17 00:00:00 2001 From: John Smith Date: Fri, 2 Mar 2012 18:31:25 +0900 Subject: Fix for 927074 : resize buttons, and add on tree double click (bzr r11040) --- src/ui/dialog/livepatheffect-add.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ui/dialog/livepatheffect-add.cpp') diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index d53c85e33..6420702ef 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -80,6 +80,7 @@ LivePathEffectAdd::LivePathEffectAdd() : /** * Signal handlers */ + effectlist_treeview.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &LivePathEffectAdd::onButtonEvent) ); close_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)); add_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onAdd)); signal_delete_event().connect( sigc::bind_return(sigc::hide(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)), true ) ); @@ -100,6 +101,14 @@ void LivePathEffectAdd::onClose() hide(); } +void LivePathEffectAdd::onButtonEvent(GdkEventButton* evt) +{ + // Double click on tree is same as clicking the add button + if (evt->type == GDK_2BUTTON_PRESS) { + onAdd(); + } +} + const Util::EnumData* LivePathEffectAdd::getActiveData() { -- cgit v1.2.3