wxPreviewCanvas* m_previewCanvas;
wxPreviewControlBar* m_controlBar;
wxPrintPreviewBase* m_printPreview;
+ wxWindowDisabler* m_windowDisabler;
private:
DECLARE_CLASS(wxPreviewFrame)
m_printPreview = preview;
m_controlBar = NULL;
m_previewCanvas = NULL;
+ m_windowDisabler = NULL;
// Give the application icon
#ifdef __WXMSW__
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();
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();