diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-18 14:53:55 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-18 14:53:55 +0000 |
commit | b7cfd2849ebb0d949af3ee39f70cbf1856fbfe0f (patch) | |
tree | d30c3a24c4b74f78f830e25eb4f176b36a764cf1 /gtk2_ardour/port_matrix_body.cc | |
parent | 0f313672f59f7a00314400f82fc012e56df8d095 (diff) |
Fix dragging grid lines when you move the mouse outside of the grid during the drag.
git-svn-id: svn://localhost/ardour2/branches/3.0@6120 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_body.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc index 3d961baa5c..79efd22b7c 100644 --- a/gtk2_ardour/port_matrix_body.cc +++ b/gtk2_ardour/port_matrix_body.cc @@ -328,14 +328,19 @@ PortMatrixBody::on_button_press_event (GdkEventButton* ev) bool PortMatrixBody::on_button_release_event (GdkEventButton* ev) { - if (Gdk::Region (_grid->parent_rectangle()).point_in (ev->x, ev->y)) { - - _grid->button_release ( - _grid->parent_to_component_x (ev->x), - _grid->parent_to_component_y (ev->y), - ev->button, ev->time - ); - + for (list<PortMatrixComponent*>::iterator i = _components.begin(); i != _components.end(); ++i) { + if (Gdk::Region ((*i)->parent_rectangle()).point_in (ev->x, ev->y)) { + (*i)->button_release ( + (*i)->parent_to_component_x (ev->x), + (*i)->parent_to_component_y (ev->y), + ev->button, ev->time + ); + } else { + (*i)->button_release ( + -1, -1, + ev->button, ev->time + ); + } } return true; |