print dialogs ignore user paper settings in non C locale (patch 696835)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -503,9 +503,13 @@ bool wxGenericPrintSetupDialog::TransferDataFromWindow()
|
|||||||
}
|
}
|
||||||
if (m_paperTypeChoice)
|
if (m_paperTypeChoice)
|
||||||
{
|
{
|
||||||
wxString val(m_paperTypeChoice->GetStringSelection());
|
int selectedItem = m_paperTypeChoice->GetSelection();
|
||||||
if (!val.IsNull() && val != wxT(""))
|
if (selectedItem != -1)
|
||||||
m_printData.SetPaperId(wxThePrintPaperDatabase->ConvertNameToId(val));
|
{
|
||||||
|
wxPrintPaperType *paper = (wxPrintPaperType *)wxThePrintPaperDatabase->Nth(selectedItem)->Data();
|
||||||
|
if (paper != NULL)
|
||||||
|
m_printData.SetPaperId( paper->GetId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -765,10 +769,10 @@ bool wxGenericPageSetupDialog::TransferDataFromWindow()
|
|||||||
|
|
||||||
if (m_paperTypeChoice)
|
if (m_paperTypeChoice)
|
||||||
{
|
{
|
||||||
wxString val(m_paperTypeChoice->GetStringSelection());
|
int selectedItem = m_paperTypeChoice->GetSelection();
|
||||||
if (!val.IsEmpty())
|
if (selectedItem != -1)
|
||||||
{
|
{
|
||||||
wxPrintPaperType* paper = wxThePrintPaperDatabase->FindPaperType(val);
|
wxPrintPaperType *paper = (wxPrintPaperType *)wxThePrintPaperDatabase->Nth(selectedItem)->Data();
|
||||||
if ( paper )
|
if ( paper )
|
||||||
{
|
{
|
||||||
m_pageData.SetPaperSize(wxSize(paper->GetWidth()/10, paper->GetHeight()/10));
|
m_pageData.SetPaperSize(wxSize(paper->GetWidth()/10, paper->GetHeight()/10));
|
||||||
|
Reference in New Issue
Block a user