bug with incorrect & test fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2676,13 +2676,15 @@ wxListCtrl::~wxListCtrl()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
bool wxListCtrl::Create(wxWindow *parent,
|
||||||
const wxPoint &pos, const wxSize &size,
|
wxWindowID id,
|
||||||
|
const wxPoint &pos,
|
||||||
|
const wxSize &size,
|
||||||
long style,
|
long style,
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
const wxValidator &validator,
|
const wxValidator &validator,
|
||||||
#endif
|
#endif
|
||||||
const wxString &name )
|
const wxString &name)
|
||||||
{
|
{
|
||||||
m_imageListNormal = (wxImageList *) NULL;
|
m_imageListNormal = (wxImageList *) NULL;
|
||||||
m_imageListSmall = (wxImageList *) NULL;
|
m_imageListSmall = (wxImageList *) NULL;
|
||||||
@@ -2690,28 +2692,16 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_mainWin = (wxListMainWindow*) NULL;
|
m_mainWin = (wxListMainWindow*) NULL;
|
||||||
m_headerWin = (wxListHeaderWindow*) NULL;
|
m_headerWin = (wxListHeaderWindow*) NULL;
|
||||||
|
|
||||||
long s = style;
|
if ( !(style & (wxLC_REPORT | wxLC_LIST | wxLC_ICON)) )
|
||||||
|
|
||||||
#ifdef __VMS__
|
|
||||||
#pragma message disable codcauunr
|
|
||||||
// VMS reports on this part the warning:
|
|
||||||
// statement either is unreachable or causes unreachable code
|
|
||||||
#endif
|
|
||||||
if ((s & wxLC_REPORT == 0) &&
|
|
||||||
(s & wxLC_LIST == 0) &&
|
|
||||||
(s & wxLC_ICON == 0))
|
|
||||||
{
|
{
|
||||||
s = s | wxLC_LIST;
|
style = style | wxLC_LIST;
|
||||||
}
|
}
|
||||||
#ifdef __VMS__
|
|
||||||
#pragma message enable codcauunr
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool ret = wxControl::Create( parent,
|
bool ret = wxControl::Create( parent,
|
||||||
id,
|
id,
|
||||||
pos,
|
pos,
|
||||||
size,
|
size,
|
||||||
s,
|
style,
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
validator,
|
validator,
|
||||||
#endif
|
#endif
|
||||||
@@ -2721,9 +2711,10 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
|||||||
SetValidator( validator );
|
SetValidator( validator );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (s & wxSUNKEN_BORDER) s -= wxSUNKEN_BORDER;
|
if (style & wxSUNKEN_BORDER)
|
||||||
|
style -= wxSUNKEN_BORDER;
|
||||||
|
|
||||||
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s );
|
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, style );
|
||||||
|
|
||||||
if (HasFlag(wxLC_REPORT))
|
if (HasFlag(wxLC_REPORT))
|
||||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
|
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
|
||||||
|
Reference in New Issue
Block a user