]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/print.cpp
Always invoke default action even if dclick is caught from wxListBox (as per wxMSW...
[wxWidgets.git] / src / gtk / print.cpp
index 876888780b36f6290e43acfe3ecb521fbb3f948f..7f7722f73ae390f326ff9ef9cfacd97e44b87fa3 100644 (file)
@@ -2269,8 +2269,6 @@ void wxGtkPrintPreview::Init(wxPrintout * WXUNUSED(printout),
                              wxPrintout * WXUNUSED(printoutForPrinting),
                              wxPrintData *data)
 {
-    DetermineScaling();
-
     // convert wxPrintQuality to resolution (input pointer can be NULL)
     wxPrintQuality quality = data ? data->GetQuality() : wxPRINT_QUALITY_MEDIUM;
     switch ( quality )
@@ -2279,7 +2277,22 @@ void wxGtkPrintPreview::Init(wxPrintout * WXUNUSED(printout),
             m_resolution = 1200;
             break;
 
+        case wxPRINT_QUALITY_LOW:
+            m_resolution = 300;
+            break;
+
+        case wxPRINT_QUALITY_DRAFT:
+            m_resolution = 150;
+            break;
+
         default:
+            if ( quality > 0 )
+            {
+                // positive values directly indicate print resolution
+                m_resolution = quality;
+                break;
+            }
+
             wxFAIL_MSG( "unknown print quality" );
             // fall through
 
@@ -2287,14 +2300,9 @@ void wxGtkPrintPreview::Init(wxPrintout * WXUNUSED(printout),
             m_resolution = 600;
             break;
 
-        case wxPRINT_QUALITY_LOW:
-            m_resolution = 300;
-            break;
-
-        case wxPRINT_QUALITY_DRAFT:
-            m_resolution = 150;
-            break;
     }
+
+    DetermineScaling();
 }
 
 wxGtkPrintPreview::wxGtkPrintPreview(wxPrintout *printout,