X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b719a1c09fb5017f0a7a525b216d56105fca7f1..1f11ce5b66872407bc97a0e446a5f82dea401930:/src/generic/treelist.cpp diff --git a/src/generic/treelist.cpp b/src/generic/treelist.cpp index 46ce84c4e5..6063ccf0a6 100644 --- a/src/generic/treelist.cpp +++ b/src/generic/treelist.cpp @@ -1608,6 +1608,17 @@ void wxTreeListCtrl::OnSize(wxSizeEvent& event) const wxRect rect = GetClientRect(); m_view->SetSize(rect); +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + // The generic implementation doesn't refresh itself immediately which + // is annoying during "live resizing", so do it forcefully here to + // ensure that the items are re-laid out and the focus rectangle is + // redrawn correctly (instead of leaving traces) while our size is + // being changed. + wxWindow* const view = GetView(); + view->Refresh(); + view->Update(); +#endif // wxHAS_GENERIC_DATAVIEWCTRL + // Resize the first column to take the remaining available space. const unsigned numColumns = GetColumnCount(); if ( !numColumns )