From 0bbc9144cca18495775cdc8b2050e5141bfcdc12 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 25 Jul 2010 21:19:55 +0000 Subject: (1) extend region if needed BEFORE adding step-edit note, so that the new note ends up in the selection (2) hide the channel selector that shows up on note-right-click after its clicked anywhere, not just if the note(s) channel(s) are changed git-svn-id: svn://localhost/ardour2/branches/3.0@7492 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_channel_selector.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gtk2_ardour/midi_channel_selector.cc') diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc index c889602b8c..e5416c81ff 100644 --- a/gtk2_ardour/midi_channel_selector.cc +++ b/gtk2_ardour/midi_channel_selector.cc @@ -53,6 +53,10 @@ MidiChannelSelector::MidiChannelSelector(int n_rows, int n_columns, int start_ro &_buttons[row][column], channel_nr - 1)); + _buttons[row][column].signal_button_release_event().connect( + sigc::mem_fun(this, &MidiChannelSelector::was_clicked), false); + + int table_row = start_row + row; int table_column = start_column + column; attach(_buttons[row][column], table_column, table_column + 1, table_row, table_row + 1); @@ -64,6 +68,13 @@ MidiChannelSelector::~MidiChannelSelector() { } +bool +MidiChannelSelector::was_clicked (GdkEventButton*) +{ + clicked (); + return false; +} + void MidiChannelSelector::set_channel_colors(const uint32_t new_channel_colors[16]) { -- cgit v1.2.3