[PATCH] comctl32: Dont Recalculate Visible Order after removing all children.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Wed Aug 14 01:08:46 CDT 2019
Calling Expand with TVE_COLLAPSE | TVE_COLLAPSERESET which removes
all child items and results in infoPtr->firstVisible being NULL. However
TREEVIEW_ComputeItemRect requires that firstVisible to be valid.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/comctl32/treeview.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 3c73964304..8babdf8d69 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -3391,7 +3391,8 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
}
}
- TREEVIEW_RecalculateVisibleOrder(infoPtr, item);
+ if(!bRemoveChildren)
+ TREEVIEW_RecalculateVisibleOrder(infoPtr, item);
if (nextItem)
scrollDist = -(scrollDist - nextItem->rect.top);
--
2.17.1
More information about the wine-devel
mailing list