| [ Return to Bugs & Features | Post Text | Post File | Prev | Next ]
STR #2767
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fix scrollbar visiblity from causing miscalcuation on select() |
Version: | 1.4-feature |
Created By: | dfatfl |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
|
#1 | dfatfl 13:40 Nov 10, 2011 |
| This patch fixes a problem where select() is used to select an item before drawing (and in other instances) since the horizontal or virtual scrollbar may be reported as visible when they won't be in the end (and the other way around). For example, browser box that is created to a certain size (up to a max) based on number of items, example 2, now 2 items are added, select (2) is used to select the second item, what ends up being drawn is 2nd item at the top (first item scrolled off) with a scrollbar that is jacked up because it's small. Occurs because hscrollbar was reported as visible at the time. There are probably lots of similar conditions that occur. This patch fixes it, and adds a new item_quick_width so we can always calculate the full size (quickly) instead of only partial (per scroll of screen) if the widest item was deleted. I've tested basic functionality, probably need browser test app in test folder to allow adding/removing items so edge cases and dynamiclly adding/removing items is fully tested. | |
|
#2 | matt 14:19 Dec 10, 2011 |
| Could you please submit a short self-contained example and explain how this situation can be repeated? Thanks. | |
|
#3 | dfatfl 23:33 Dec 10, 2011 |
| I guess I could, the steps until I can get to it is:
1) create a Fl_Browser object with a height equal to two items (perfect fit). (xyz=new FL_Browser(....))
2) add two items to the browser. xyz->add("1"); xyz->add("2");
3) select the second item. xyz->select(2)
open / show your window that contains the browser object. | |
|
#4 | AlbrechtS 03:35 Feb 07, 2019 |
| Moved from 1.3-feature to 1.4-feature.
This STR has been superseded, see also cumulative patch in STR 3485: https://www.fltk.org/str.php?L3485 | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |