Reordered font setting since on wxX11 a mem DC is not valid

until the bitmap is selected into it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-10-02 08:11:27 +00:00
parent 4d1c976da4
commit fdfc424e32

View File

@@ -139,12 +139,12 @@ bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor)
dc.SetFont(wxNullFont);
wxMemoryDC dc2;
dc2.SetFont(font);
// Sometimes GetTextExtent isn't accurate enough, so make it longer
wxBitmap bitmap((int) ((w+2) * 1.5), (int) h+2);
dc2.SelectObject(bitmap);
dc2.SetFont(font);
dc2.SetBackground(* wxWHITE_BRUSH);
dc2.Clear();
dc2.SetBackgroundMode(wxTRANSPARENT);