From 9a182d09824fb1d2d025cfa9b5803350d47eb377 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 15 Sep 2019 00:56:36 +0200 Subject: [PATCH] Move assert for calling SetItemCount() without wxLC_VIRTUAL This makes it more clear that the base class method is not supposed to be called. --- src/qt/listctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/listctrl.cpp b/src/qt/listctrl.cpp index a9f36df678..25b06889fc 100644 --- a/src/qt/listctrl.cpp +++ b/src/qt/listctrl.cpp @@ -709,6 +709,7 @@ public: virtual void SetVirtualItemCount(long WXUNUSED(count)) { + wxFAIL_MSG("Shouldn't be called if wxLC_VIRTUAL is not used"); } protected: @@ -1798,7 +1799,6 @@ long wxListCtrl::DoInsertColumn(long col, const wxListItem& info) void wxListCtrl::SetItemCount(long count) { - wxASSERT(HasFlag(wxLC_VIRTUAL)); m_model->SetVirtualItemCount(count); }