From dc6a272b8910b44dccfd4960c56986d42f556247 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Apr 2009 17:58:35 +0000 Subject: [PATCH] correct the assert added by r60056 to not trigger in non-report modes (see #10687) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index baf52465ad..9c925a1bbb 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -3200,8 +3200,15 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, const wxListItem& info, LV_ITEM& lvItem) { - wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(), - "wxListCtrl column index out of bounds" ); + if ( ctrl->InReportView() ) + { + wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(), + "wxListCtrl column index out of bounds" ); + } + else // not in report view + { + wxASSERT_MSG( info.m_col == 0, "columns only exist in report view" ); + } lvItem.iItem = (int) info.m_itemId; -- 2.45.2