From a3ec2e24a2515d703388d814ca17ac6c754a0199 Mon Sep 17 00:00:00 2001
From: Marco Serantoni <marco.serantoni@gmail.com>
Date: Sat, 21 May 2011 11:16:57 +0200
Subject: [PATCH] OSX: Fix for bug #717381 - Print Preview hangs

---
 eeschema/dialogs/dialog_print_using_printer.cpp | 5 +++++
 gerbview/dialogs/dialog_print_using_printer.cpp | 4 ++++
 pcbnew/dialogs/dialog_print_using_printer.cpp   | 5 +++++
 3 files changed, 14 insertions(+)

diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp
index 087e6cce24..7bb79ba898 100644
--- a/eeschema/dialogs/dialog_print_using_printer.cpp
+++ b/eeschema/dialogs/dialog_print_using_printer.cpp
@@ -94,6 +94,11 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent
 
     m_checkReference->SetValue( aParent->GetPrintSheetReference() );
     m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
+
+#ifdef __WXMAC__
+    /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
+   m_buttonPreview->Hide();
+#endif
 }
 
 
diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp
index cc0463de0b..2dc4589957 100644
--- a/gerbview/dialogs/dialog_print_using_printer.cpp
+++ b/gerbview/dialogs/dialog_print_using_printer.cpp
@@ -118,6 +118,10 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( GERBVIEW_FRAME* parent )
     {
         GetSizer()->SetSizeHints( this );
     }
+#ifdef __WXMAC__
+    /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
+   m_buttonPreview->Hide();
+#endif
 
     m_buttonPrint->SetDefault();
 }
diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp
index 719fde4b89..74b032e397 100644
--- a/pcbnew/dialogs/dialog_print_using_printer.cpp
+++ b/pcbnew/dialogs/dialog_print_using_printer.cpp
@@ -129,6 +129,11 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent )
     }
 
     Center();
+#ifdef __WXMAC__
+    /* Problems with modal on wx-2.9 - Anyway preview is standard for OSX */
+   m_buttonPreview->Hide();
+#endif
+
 }