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
This commit is contained in:
Vadim Zeitlin
2009-04-21 17:58:35 +00:00
parent d589327a5d
commit dc6a272b89

View File

@@ -3199,9 +3199,16 @@ static void wxConvertToMSWFlags(long state, long stateMask, LV_ITEM& lvItem)
static void wxConvertToMSWListItem(const wxListCtrl *ctrl, static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
const wxListItem& info, const wxListItem& info,
LV_ITEM& lvItem) LV_ITEM& lvItem)
{
if ( ctrl->InReportView() )
{ {
wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(), wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(),
"wxListCtrl column index out of bounds" ); "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; lvItem.iItem = (int) info.m_itemId;