Also the radiobox was unitialised.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-04-03 16:59:38 +00:00
parent 378f7b3f89
commit 59e2b19ff7

View File

@@ -137,6 +137,7 @@ void wxGenericPrintDialog::Init(wxWindow *parent)
m_fromText = (wxTextCtrl*)NULL; m_fromText = (wxTextCtrl*)NULL;
m_toText = (wxTextCtrl*)NULL; m_toText = (wxTextCtrl*)NULL;
m_rangeRadioBox = (wxRadioBox *)NULL;
if (m_printDialogData.GetFromPage() != 0) if (m_printDialogData.GetFromPage() != 0)
{ {
@@ -287,6 +288,7 @@ bool wxGenericPrintDialog::TransferDataToWindow()
m_fromText->SetValue(buf); m_fromText->SetValue(buf);
sprintf(buf, "%d", m_printDialogData.GetToPage()); sprintf(buf, "%d", m_printDialogData.GetToPage());
m_toText->SetValue(buf); m_toText->SetValue(buf);
if(m_rangeRadioBox)
if (m_printDialogData.GetAllPages()) if (m_printDialogData.GetAllPages())
m_rangeRadioBox->SetSelection(0); m_rangeRadioBox->SetSelection(0);
else else
@@ -296,11 +298,14 @@ bool wxGenericPrintDialog::TransferDataToWindow()
{ {
m_fromText->Enable(FALSE); m_fromText->Enable(FALSE);
m_toText->Enable(FALSE); m_toText->Enable(FALSE);
if(m_rangeRadioBox)
{
m_rangeRadioBox->SetSelection(0); m_rangeRadioBox->SetSelection(0);
m_rangeRadioBox->wxRadioBox::Enable(1, FALSE); m_rangeRadioBox->wxRadioBox::Enable(1, FALSE);
} }
} }
} }
}
sprintf(buf, "%d", m_printDialogData.GetNoCopies()); sprintf(buf, "%d", m_printDialogData.GetNoCopies());
m_noCopiesText->SetValue(buf); m_noCopiesText->SetValue(buf);
@@ -318,11 +323,14 @@ bool wxGenericPrintDialog::TransferDataFromWindow()
if(m_fromText) m_printDialogData.SetFromPage(atoi(m_fromText->GetValue())); if(m_fromText) m_printDialogData.SetFromPage(atoi(m_fromText->GetValue()));
if(m_toText) m_printDialogData.SetToPage(atoi(m_toText->GetValue())); if(m_toText) m_printDialogData.SetToPage(atoi(m_toText->GetValue()));
} }
if(m_rangeRadioBox)
{
if (m_rangeRadioBox->GetSelection() == 0) if (m_rangeRadioBox->GetSelection() == 0)
m_printDialogData.SetAllPages(TRUE); m_printDialogData.SetAllPages(TRUE);
else else
m_printDialogData.SetAllPages(FALSE); m_printDialogData.SetAllPages(FALSE);
} }
}
else else
{ // continuous printing { // continuous printing
m_printDialogData.SetFromPage(1); m_printDialogData.SetFromPage(1);