]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dcclient.cpp
Fixed bug with disappearing menus. They were
[wxWidgets.git] / src / gtk1 / dcclient.cpp
index dc90bf665aff7ff1a9e4adb160e4fee08c1a4fcf..51f831c216ad88cb1d6ba91ee3b810f95ad776db 100644 (file)
@@ -246,6 +246,8 @@ wxWindowDC::wxWindowDC()
 
 wxWindowDC::wxWindowDC( wxWindow *window )
 {
+    wxASSERT_MSG( window, wxT("DC needs a window") );
+
     m_penGC = (GdkGC *) NULL;
     m_brushGC = (GdkGC *) NULL;
     m_textGC = (GdkGC *) NULL;
@@ -256,8 +258,6 @@ wxWindowDC::wxWindowDC( wxWindow *window )
     m_isScreenDC = FALSE;
     m_font = window->GetFont();
 
-    wxASSERT_MSG( window, wxT("DC needs a window") );
-
     GtkWidget *widget = window->m_wxwindow;
 
     // some controls don't have m_wxwindow - like wxStaticBox, but the user
@@ -1104,10 +1104,10 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
 
     if (!m_window) return FALSE;
 
-#if 0
+#if 1
     // transform the source DC coords to the device ones
-    xsrc = XLOG2DEV(xsrc);
-    ysrc = YLOG2DEV(ysrc);
+    xsrc = source->XLOG2DEV(xsrc);
+    ysrc = source->YLOG2DEV(ysrc);
 #endif
 
     wxClientDC *srcDC = (wxClientDC*)source;
@@ -1433,7 +1433,6 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
     dc.SetBrush(*wxBLACK_BRUSH);
     dc.Clear();
     dc.DrawText(text, 0, 0);
-    dc.SetFont(wxNullFont);
     dc.SelectObject(wxNullBitmap);
 
     // Calculate the size of the rotated bounding box.