Avoid trouble during initialisation & typo fix (patch #1523304).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -574,9 +574,13 @@ void wxDatePickerCtrlGeneric::DoMoveWindow(int x, int y, int w, int h)
|
|||||||
|
|
||||||
wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const
|
wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
|
if (m_btn && m_txt)
|
||||||
|
{
|
||||||
int bh=m_btn->GetBestSize().y;
|
int bh=m_btn->GetBestSize().y;
|
||||||
int eh=m_txt->GetBestSize().y;
|
int eh=m_txt->GetBestSize().y;
|
||||||
return wxSize(DEFAULT_ITEM_WIDTH, bh > eh ? bh : eh);
|
return wxSize(DEFAULT_ITEM_WIDTH, bh > eh ? bh : eh);
|
||||||
|
}
|
||||||
|
return wxSize(DEFAULT_ITEM_WIDTH,DEFAULT_ITEM_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -736,7 +740,7 @@ bool wxDatePickerCtrlGeneric::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
|
|||||||
{
|
{
|
||||||
if (dt1)
|
if (dt1)
|
||||||
*dt1 = m_cal->GetLowerDateLimit();
|
*dt1 = m_cal->GetLowerDateLimit();
|
||||||
if (dt1)
|
if (dt2)
|
||||||
*dt2 = m_cal->GetUpperDateLimit();
|
*dt2 = m_cal->GetUpperDateLimit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user