From b8e57034a25ef17ed439f142a15dacb11bde4489 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Jul 2008 17:52:52 +0000 Subject: [PATCH] don't assert when GetSubItemRect() is called in non-report view if it's called with wxLIST_GETSUBITEMRECT_WHOLEITEM git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 613d65a38e..97bb82faaa 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4153,7 +4153,8 @@ wxRect wxListMainWindow::GetViewRect() const bool wxListMainWindow::GetSubItemRect(long item, long subItem, wxRect& rect) const { - wxCHECK_MSG( InReportView(), false, + wxCHECK_MSG( subItem == wxLIST_GETSUBITEMRECT_WHOLEITEM || InReportView(), + false, _T("GetSubItemRect only meaningful in report view") ); wxCHECK_MSG( item >= 0 && (size_t)item < GetItemCount(), false, _T("invalid item in GetSubItemRect") );