diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-08-30 05:51:39 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-08-30 05:51:39 +0000 |
| commit | b786f11bc6ae61f1e4ba03799a80bc8279810c04 (patch) | |
| tree | e3943f1605941c1fdf1430da0387b6c5f47ee899 /src/Fl_Tabs.cxx | |
| parent | d7b0d5b7322803130621460cfa64d1efd0b046db (diff) | |
The input focus got messed up if you called Fl_Tabs::value(x) and there
was something that took focus on an earlier tab.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1296 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
| -rw-r--r-- | src/Fl_Tabs.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index fe85eb126..37bb9f021 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tabs.cxx,v 1.6.2.7 2000/08/12 08:42:12 spitzak Exp $" +// "$Id: Fl_Tabs.cxx,v 1.6.2.8 2000/08/30 05:51:39 spitzak Exp $" // // Tab widget for the Fast Light Tool Kit (FLTK). // @@ -178,16 +178,17 @@ Fl_Widget* Fl_Tabs::value() { // visible, iff it is really a child: int Fl_Tabs::value(Fl_Widget *newvalue) { Fl_Widget*const* a = array(); + int ret = 0; for (int i=children(); i--;) { Fl_Widget* o = *a++; if (o == newvalue) { - if (o->visible()) return 0; // no change + if (!o->visible()) ret = 1; o->show(); } else { o->hide(); } } - return 1; + return ret; } enum {LEFT, RIGHT, SELECTED}; @@ -272,5 +273,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.7 2000/08/12 08:42:12 spitzak Exp $". +// End of "$Id: Fl_Tabs.cxx,v 1.6.2.8 2000/08/30 05:51:39 spitzak Exp $". // |
