From 6d6d86a68427294503e40baee75c8f5758745af2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 21 Oct 2006 01:17:21 +0000 Subject: [PATCH] Avoid nested DC assert git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index eea37b0384..42db9247e5 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3946,6 +3946,8 @@ bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) const void wxListMainWindow::RecalculatePositions(bool noRefresh) { + const int lineHeight = GetLineHeight(); + wxClientDC dc( this ); dc.SetFont( GetFont() ); @@ -3979,8 +3981,6 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh) clientHeight; GetSize( &clientWidth, &clientHeight ); - const int lineHeight = GetLineHeight(); - if ( InReportView() ) { // all lines have the same height and we scroll one line per step -- 2.47.2