From ac41c5e1833800307050b4aecea9c607e6d7596f Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 25 Apr 2000 19:23:55 +0000 Subject: [PATCH] Small fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/notebook/notebook.cpp | 3 ++- src/generic/calctrl.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 3d0bea58c1..0892b51d68 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -243,7 +243,8 @@ void MyFrame::OnInsertPage(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnDeletePage(wxCommandEvent& WXUNUSED(event)) { - m_notebook->DeletePage( m_notebook->GetPageCount()-1 ); + if (m_notebook->GetPageCount() > 0) + m_notebook->DeletePage( m_notebook->GetPageCount()-1 ); } void MyFrame::OnNextPage(wxCommandEvent& WXUNUSED(event)) diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 34c346e4c7..cb20b9c23c 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -121,6 +121,7 @@ wxMonthComboBox::wxMonthComboBox(wxCalendarCtrl *cal) } SetSelection(m_cal->GetDate().GetMonth()); + SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); } wxYearSpinCtrl::wxYearSpinCtrl(wxCalendarCtrl *cal)