]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcclient.cpp
TransferFrom/ToWindow() were reverted, fixed
[wxWidgets.git] / src / gtk / dcclient.cpp
index 43183328f995e5491208dce8dfd7b64d75f6909f..92ae53ff9d9b6af8ce7754fb08d46ec8733c45aa 100644 (file)
@@ -7,10 +7,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "dcclient.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #ifdef __VMS
 #define XCopyPlane XCOPYPLANE
 #endif
@@ -1835,6 +1838,12 @@ void wxWindowDC::SetPen( const wxPen &pen )
                    ( fabs((double) XLOG2DEVREL(width)) +
                      fabs((double) YLOG2DEVREL(width)) ) / 2.0;
         width = (int)w;
+        if ( !width )
+        {
+            // width can't be 0 or an internal GTK error occurs inside
+            // gdk_gc_set_dashes() below
+            width = 1;
+        }
     }
 
     static const wxGTKDash dotted[] = {1, 1};