X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf9b6266faaa6534b75e5282aab58f1476eecbaa..8f974c520a8733158591891458fda10fae4c3950:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 63eb8ffba0..5b030dd304 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1928,10 +1928,14 @@ void wxListCtrl::RefreshItem(long item) void wxListCtrl::RefreshItems(long itemFrom, long itemTo) { - for ( long item = itemFrom; item <= itemTo; item++ ) - { - RefreshItem(item); - } + wxRect rect1, rect2; + GetItemRect(itemFrom, rect1); + GetItemRect(itemTo, rect2); + + wxRect rect = rect1; + rect.height = rect2.GetBottom() - rect1.GetTop(); + + RefreshRect(rect); } // ----------------------------------------------------------------------------