diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H index 8fb22cae4..613574a01 100644 --- a/FL/Fl_Browser_.H +++ b/FL/Fl_Browser_.H @@ -3,7 +3,7 @@ // // Common browser header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index e8c00174a..d0a9b9989 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -657,6 +657,9 @@ int Fl_Browser::topline() const { internally for optimization of later item changes. This can be slow if there are many items in the browser. + It returns immediately (w/o recalculation) if \p newSize equals + the current textsize(). + You \e may need to call redraw() to see the effect and to have the scrollbar positions recalculated. @@ -664,6 +667,8 @@ int Fl_Browser::topline() const { unless you really need to \e change the size later. */ void Fl_Browser::textsize(Fl_Fontsize newSize) { + if (newSize == textsize()) + return; // avoid recalculation Fl_Browser_::textsize(newSize); new_list(); full_height_ = 0;