Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1afef2c7
Commit
1afef2c7
authored
Nov 27, 2003
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Nov 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In TREEVIEW_EnsureVisible handle case where firstVisible is NULL.
parent
cfcc4493
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
treeview.c
dlls/comctl32/treeview.c
+11
-6
No files found.
dlls/comctl32/treeview.c
View file @
1afef2c7
...
...
@@ -4382,8 +4382,10 @@ static INT TREEVIEW_ProcessLetterKeys(
static
LRESULT
TREEVIEW_EnsureVisible
(
TREEVIEW_INFO
*
infoPtr
,
HTREEITEM
item
,
BOOL
bHScroll
)
{
int
viscount
;
BOOL
hasFirstVisible
=
infoPtr
->
firstVisible
!=
NULL
;
HTREEITEM
newFirstVisible
=
NULL
;
int
visible_pos
;
int
visible_pos
=
-
1
;
if
(
!
TREEVIEW_ValidItem
(
infoPtr
,
item
))
return
FALSE
;
...
...
@@ -4408,23 +4410,26 @@ TREEVIEW_EnsureVisible(TREEVIEW_INFO *infoPtr, HTREEITEM item, BOOL bHScroll)
}
}
TRACE
(
"%p (%s) %ld - %ld
\n
"
,
item
,
TREEVIEW_ItemName
(
item
),
item
->
visibleOrder
,
infoPtr
->
firstVisible
->
visibleOrder
);
viscount
=
TREEVIEW_GetVisibleCount
(
infoPtr
);
visible_pos
=
item
->
visibleOrder
-
infoPtr
->
firstVisible
->
visibleOrder
;
TRACE
(
"%p (%s) %ld - %ld viscount(%d)
\n
"
,
item
,
TREEVIEW_ItemName
(
item
),
item
->
visibleOrder
,
hasFirstVisible
?
infoPtr
->
firstVisible
->
visibleOrder
:
-
1
,
viscount
);
if
(
hasFirstVisible
)
visible_pos
=
item
->
visibleOrder
-
infoPtr
->
firstVisible
->
visibleOrder
;
if
(
visible_pos
<
0
)
{
/* item is before the start of the list: put it at the top. */
newFirstVisible
=
item
;
}
else
if
(
visible_pos
>=
TREEVIEW_GetVisibleCount
(
infoPtr
)
else
if
(
visible_pos
>=
viscount
/* Sometimes, before we are displayed, GVC is 0, causing us to
* spuriously scroll up. */
&&
visible_pos
>
0
)
{
/* item is past the end of the list. */
int
scroll
=
visible_pos
-
TREEVIEW_GetVisibleCount
(
infoPtr
)
;
int
scroll
=
visible_pos
-
viscount
;
newFirstVisible
=
TREEVIEW_GetListItem
(
infoPtr
,
infoPtr
->
firstVisible
,
scroll
+
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment