Commit 292d8429 authored by Adam Gundy's avatar Adam Gundy Committed by Alexandre Julliard

TREEVIEW_UpdateScrollBars() now copes with an empty tree.

parent d4fcc4bd
......@@ -2690,6 +2690,8 @@ TREEVIEW_UpdateScrollBars(TREEVIEW_INFO *infoPtr)
if (vert)
{
si.nPage = TREEVIEW_GetVisibleCount(infoPtr);
if ( si.nPage )
{
si.nPos = infoPtr->firstVisible->visibleOrder;
si.nMax = infoPtr->maxVisibleOrder - 1;
......@@ -2705,6 +2707,13 @@ TREEVIEW_UpdateScrollBars(TREEVIEW_INFO *infoPtr)
ShowScrollBar(hwnd, SB_VERT, FALSE);
infoPtr->uInternalStatus &= ~TV_VSCROLL;
}
}
else
{
if (infoPtr->uInternalStatus & TV_VSCROLL)
ShowScrollBar(hwnd, SB_VERT, FALSE);
infoPtr->uInternalStatus &= ~TV_VSCROLL;
}
if (horz)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment