Fixed problem trying to print from a preview, whereby wrong printer
class was used instead of Gnome printer class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,6 +52,8 @@ wxGTK:
|
|||||||
|
|
||||||
- Fixed problem with choice editor in wxGrid whereby the editor
|
- Fixed problem with choice editor in wxGrid whereby the editor
|
||||||
lost focus when the combobox menu was shown.
|
lost focus when the combobox menu was shown.
|
||||||
|
- Fixed problem trying to print from a preview, whereby wrong printer
|
||||||
|
class was used.
|
||||||
|
|
||||||
wxMac:
|
wxMac:
|
||||||
|
|
||||||
|
@@ -1973,9 +1973,9 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
|
|||||||
// it just crashes
|
// it just crashes
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
wxPostScriptPrintNativeData *data =
|
wxPostScriptPrintNativeData *data =
|
||||||
(wxPostScriptPrintNativeData *) m_printData.GetNativeData();
|
wxDynamicCast(m_printData.GetNativeData(), wxPostScriptPrintNativeData);
|
||||||
|
|
||||||
if (!data->GetFontMetricPath().empty())
|
if (data && !data->GetFontMetricPath().empty())
|
||||||
{
|
{
|
||||||
afmName = data->GetFontMetricPath();
|
afmName = data->GetFontMetricPath();
|
||||||
afmName << wxFILE_SEP_PATH << name;
|
afmName << wxFILE_SEP_PATH << name;
|
||||||
|
@@ -307,7 +307,16 @@ bool wxPostScriptPrintPreview::Print(bool interactive)
|
|||||||
{
|
{
|
||||||
if (!m_printPrintout)
|
if (!m_printPrintout)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Assume that on Unix, the preview may use the PostScript
|
||||||
|
// (generic) version, but printing using the native system is required.
|
||||||
|
// TODO: make a generic print preview class from which wxPostScriptPrintPreview
|
||||||
|
// is derived.
|
||||||
|
#ifdef __UNIX__
|
||||||
|
wxPrinter printer(& m_printDialogData);
|
||||||
|
#else
|
||||||
wxPostScriptPrinter printer(& m_printDialogData);
|
wxPostScriptPrinter printer(& m_printDialogData);
|
||||||
|
#endif
|
||||||
return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user