]> git.saurik.com Git - wxWidgets.git/commitdiff
Act as wxMSW and make an assert fail, if the user forgot to give a "type flag" (previ...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 11 Oct 2008 15:54:14 +0000 (15:54 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 11 Oct 2008 15:54:14 +0000 (15:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 9d6d3c50e88a750921edbc80715f7460fc154b88..55d57648271adc83b9f993ffca0e49cf54ca41da 100644 (file)
@@ -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;