Gtk: fixed bug in TGtkWSCustomNotebook.GetTabIndexAtPos(), it should check if tabwidget is mapped.fixes #15472

git-svn-id: trunk@24209 -
This commit is contained in:
zeljko 2010-03-25 10:37:23 +00:00
parent a5ba77a96e
commit d6a4a9f651

View File

@ -606,11 +606,14 @@ begin
{$ENDIF}
// go through all tabs
Count:=g_list_length(NoteBookWidget^.Children);
for i:=0 to Count-1 do begin
for i:=0 to Count-1 do
begin
PageWidget:=gtk_notebook_get_nth_page(NoteBookWidget,i);
if PageWidget<>nil then begin
if PageWidget<>nil then
begin
TabWidget:=gtk_notebook_get_tab_label(NoteBookWidget, PageWidget);
if TabWidget<>nil then begin
if (TabWidget<>nil) and GTK_WIDGET_MAPPED(TabWidget) then
begin
// test if position is in tabwidget
if (TabWidget^.Allocation.X<=NoteBookPos.X)
and (TabWidget^.Allocation.Y<=NoteBookPos.Y)