From 53b87fc6d329bead1ed249e2487915227a145b1b Mon Sep 17 00:00:00 2001 From: carlh Date: Mon, 15 Aug 2011 14:08:01 +0000 Subject: [PATCH] Group tab fix from David Halter (#4268). git-svn-id: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@9995 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/group_tabs.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index faf5ab8ed..ab4dcd192 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::iterator* prev, list::iterato while (i != _tabs.end()) { if (i->from > c) { + *next = i; break; } @@ -275,14 +276,6 @@ GroupTabs::click_to_tab (double c, list::iterator* prev, list::iterato ++i; } - if (i != _tabs.end()) { - *next = i; - - if (under) { - (*next)++; - } - } - return under; } -- 2.11.4.GIT