View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037582 | Lazarus | IDE | public | 2020-08-16 15:50 | 2020-08-20 10:12 |
Reporter | Mark Morgan Lloyd | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Linux | ||
Product Version | 2.0.9 (SVN) | ||||
Summary | 0037582: Multi-file "search results" window scrollbar always starts with 100% | ||||
Description | If a multi-file search returns more results than fit in the window, the vertical scrollbar always occupies the entire height until the window is resized at which point it is shrunk to the correct proportion. | ||||
Additional Information | It hasn't always been like this, but for the moment I can't pinpoint the change. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r63788, r63797 | ||||
LazTarget | - | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
related to | 0034334 | closed | Dmitry Boyarintsev | Open Package Window - Treeview upside down (Regression?) |
|
This happens with any widgetset. I bisected and found the guilty revision. It is r61288 by Dmitry, from 2019-05-24. "treeview: calling UpdateScrollbars on resizing, expand, collapse or selection move. Removed UpdateScrollbars from the darwing. Prevents Cocoa drawing (upside down) glitch. 0034334" I guess the bug happens always when a TreeView is filled with more items than fit in the view. Not specific to search results window. TCustomTreeView.DoPaint may be a wrong place for calling UpdateScrollbars but it should be called somewhere after filling the tree. |
|
searchresultview.pp.patch (413 bytes)
Index: ide/searchresultview.pp =================================================================== --- ide/searchresultview.pp (revision 63672) +++ ide/searchresultview.pp (working copy) @@ -1393,8 +1393,8 @@ for i := 0 to fUpdateStrings.Count - 1 do AddNode(fUpdateStrings[i], TLazSearchMatchPos(fUpdateStrings.Objects[i])); - Items.EndUpdate; + Resize; end;//if end;//EndUpdate |
|
Ok, this solves the issue for search results. Other code with a similar problem can also add the Resize line. |
|
Thanks everybody for looking at this. If I'd realised it was a wider problem I'd have reported it earlier, although I did mention it on the forum. Since it's marked "resolved", should I close it or would it better be left open as a reminder that there might be more work to be done? |
|
Is more work needed? Maybe document it somewhere? Fixing the code so it does not cause trouble elsewhere may be difficult. |
|
I was mindful of your "other code with a similar problem" comment :-) |
|
I didn't know it was a generalized problem. Next patch might, hopefully, solve the problem in the right place. At least Works with searchresultview. treeview+revert+searchresult.patch (909 bytes)
Index: ide/searchresultview.pp =================================================================== --- ide/searchresultview.pp (revision 63672) +++ ide/searchresultview.pp (working copy) @@ -1393,7 +1393,6 @@ for i := 0 to fUpdateStrings.Count - 1 do AddNode(fUpdateStrings[i], TLazSearchMatchPos(fUpdateStrings.Objects[i])); - Items.EndUpdate; end;//if end;//EndUpdate Index: lcl/include/treeview.inc =================================================================== --- lcl/include/treeview.inc (revision 63672) +++ lcl/include/treeview.inc (working copy) @@ -2582,8 +2582,11 @@ Include(Owner.FStates,tvsUpdating) else Exclude(Owner.FStates,tvsUpdating); - if not Updating then + if not Updating then begin + Include(Owner.FStates,tvsScrollbarChanged); + Owner.UpdateScrollbars; Owner.Invalidate; + end; end; procedure TTreeNodes.EndUpdate; |
|
Applied, thanks. UpdateScrollbars is now called a little more often but not too much. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-08-16 15:50 | Mark Morgan Lloyd | New Issue | |
2020-08-17 09:21 | Juha Manninen | Assigned To | => Dmitry Boyarintsev |
2020-08-17 09:21 | Juha Manninen | Status | new => assigned |
2020-08-17 09:26 | Juha Manninen | Note Added: 0124942 | |
2020-08-17 09:26 | Juha Manninen | Relationship added | related to 0034334 |
2020-08-17 09:31 | Juha Manninen | Note Edited: 0124942 | View Revisions |
2020-08-17 16:07 | BrunoK | Note Added: 0124947 | |
2020-08-17 16:07 | BrunoK | File Added: searchresultview.pp.patch | |
2020-08-19 01:20 | Juha Manninen | Assigned To | Dmitry Boyarintsev => Juha Manninen |
2020-08-19 01:23 | Juha Manninen | Status | assigned => resolved |
2020-08-19 01:23 | Juha Manninen | Resolution | open => fixed |
2020-08-19 01:23 | Juha Manninen | Fixed in Revision | => r63788 |
2020-08-19 01:23 | Juha Manninen | LazTarget | => - |
2020-08-19 01:23 | Juha Manninen | Widgetset | GTK 2 => GTK 2 |
2020-08-19 01:23 | Juha Manninen | Note Added: 0124974 | |
2020-08-19 09:29 | Mark Morgan Lloyd | Note Added: 0124978 | |
2020-08-19 12:43 | Juha Manninen | Note Added: 0124986 | |
2020-08-19 15:04 | Mark Morgan Lloyd | Note Added: 0124990 | |
2020-08-19 16:30 | BrunoK | Note Added: 0124992 | |
2020-08-19 16:30 | BrunoK | File Added: treeview+revert+searchresult.patch | |
2020-08-19 20:10 | Juha Manninen | Status | resolved => assigned |
2020-08-19 20:10 | Juha Manninen | Resolution | fixed => open |
2020-08-20 10:12 | Juha Manninen | Status | assigned => resolved |
2020-08-20 10:12 | Juha Manninen | Resolution | open => fixed |
2020-08-20 10:12 | Juha Manninen | Fixed in Revision | r63788 => r63788, r63797 |
2020-08-20 10:12 | Juha Manninen | Widgetset | GTK 2 => GTK 2 |
2020-08-20 10:12 | Juha Manninen | Note Added: 0125007 |