From c615d6491f417f4d9ee3c672de4130c94cfe4eda Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Sat, 11 Oct 2008 15:54:14 +0000 Subject: [PATCH] Act as wxMSW and make an assert fail, if the user forgot to give a "type flag" (previously it assumed wxLC_LIST type flag). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 9d6d3c50e8..55d5764827 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5045,10 +5045,9 @@ bool wxGenericListCtrl::Create(wxWindow *parent, m_headerHeight = 0; - if ( !(style & wxLC_MASK_TYPE) ) - { - style = style | wxLC_LIST; - } + // just like in other ports, an assert will fail if the user doesn't give any type style: + wxASSERT_MSG( !(style & wxLC_MASK_TYPE), + _T("wxListCtrl style should have exactly one mode bit set") ); if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) return false; -- 2.45.2