diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-15 14:08:01 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-15 14:08:01 +0000 |
commit | 82f8214277dbc06532beb9b42a96ac155af6c5f2 (patch) | |
tree | 91f6fc91a9b6c88a897926612b09b486b124adb9 /gtk2_ardour/group_tabs.cc | |
parent | 04ac05a26d4f341aca6324626998569e4966ea11 (diff) |
Group tab fix from David Halter (#4268).
git-svn-id: svn://localhost/ardour2/branches/3.0@9995 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/group_tabs.cc')
-rw-r--r-- | gtk2_ardour/group_tabs.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index faf5ab8edc..ab4dcd1923 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -244,8 +244,8 @@ GroupTabs::render (cairo_t* cr) /** Convert a click position to a tab. * @param c Click position. - * @param prev Filled in with the previous tab to the click, or 0. - * @param next Filled in with the next tab after the click, or 0. + * @param prev Filled in with the previous tab to the click, or _tabs.end(). + * @param next Filled in with the next tab after the click, or _tabs.end(). * @return Tab under the click, or 0. */ @@ -259,6 +259,7 @@ GroupTabs::click_to_tab (double c, list<Tab>::iterator* prev, list<Tab>::iterato while (i != _tabs.end()) { if (i->from > c) { + *next = i; break; } @@ -275,14 +276,6 @@ GroupTabs::click_to_tab (double c, list<Tab>::iterator* prev, list<Tab>::iterato ++i; } - if (i != _tabs.end()) { - *next = i; - - if (under) { - (*next)++; - } - } - return under; } |