X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..7e559cd8f46964e3f6c4e4d210f3822591903123:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 6eb789e83a..bb29c3e968 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -544,6 +544,7 @@ wxFrame(parent, -1, title, pos, size, style, name) m_printPreview = preview; m_controlBar = NULL; m_previewCanvas = NULL; + m_windowDisabler = NULL; // Give the application icon #ifdef __WXMSW__ @@ -559,11 +560,8 @@ wxPreviewFrame::~wxPreviewFrame() void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { - // MakeModal doesn't work on wxMac, especially when there - // are multiple top-level windows. -#ifndef __WXMAC__ - MakeModal(FALSE); -#endif + if (m_windowDisabler) + delete m_windowDisabler; // Need to delete the printout and the print preview wxPrintout *printout = m_printPreview->GetPrintout(); @@ -598,11 +596,7 @@ void wxPreviewFrame::Initialize() SetAutoLayout( TRUE ); SetSizer( item0 ); - // MakeModal doesn't work on wxMac, especially when there - // are multiple top-level windows. -#ifndef __WXMAC__ - MakeModal(TRUE); -#endif + m_windowDisabler = new wxWindowDisabler(this); Layout();