mirror of
https://github.com/fltk/fltk.git
synced 2026-05-20 22:36:19 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user