diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-09-04 20:33:18 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-09-04 20:33:18 +0000 |
| commit | 32b9640e1ca9ce14f802309ad7818c23910dc62c (patch) | |
| tree | c89669a586e5bb23416841d4924520d8ea9a5175 /src/Fl_Tabs.cxx | |
| parent | 0196542a090c4f225061553fdfbf234cb9da89ab (diff) | |
Fixes from Matthew Morrise.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
| -rw-r--r-- | src/Fl_Tabs.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index dd728b937..3d702b3d0 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $" +// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $" // // Tab widget for the Fast Light Tool Kit (FLTK). // @@ -78,8 +78,10 @@ int Fl_Tabs::tab_positions(int* p, int* wp) { if (wp[i] > W) wp[i] = W; } // adjust edges according to visiblity: - for (i = children(); i > selected; i--) { - p[i] = p[i-1]+wp[i-1]; + if (selected >= 0) { + for (i = children(); i > selected; i--) { + p[i] = p[i-1]+wp[i-1]; + } } return selected; } @@ -300,5 +302,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) : } // -// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $". +// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $". // |
