]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treelist.cpp
Correcting typo in commit 69203
[wxWidgets.git] / src / generic / treelist.cpp
index 46ce84c4e521a1bba1c701f1037c1f07b996ff2d..6063ccf0a6f9c8ebe0da6ea8000b5c871642482d 100644 (file)
@@ -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 )