Avoid size recalculation if Fl_Browser::textsize() didn't change.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11464 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
474db7e1ff
commit
11322ede59
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user