X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..5b5ea4664162471bb709cf6addaba92936ccd36a:/src/mgl/dcmemory.cpp diff --git a/src/mgl/dcmemory.cpp b/src/mgl/dcmemory.cpp index 8ed99b6022..b782d5ed47 100644 --- a/src/mgl/dcmemory.cpp +++ b/src/mgl/dcmemory.cpp @@ -3,11 +3,12 @@ // Purpose: // Author: Robert Roebling, Vaclav Slavik // RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, 2001 Vaclav Slavik +// Copyright: (c) 1998 Robert Roebling, +// 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcmemory.h" #endif @@ -43,11 +44,11 @@ wxMemoryDC::~wxMemoryDC() void wxMemoryDC::SelectObject(const wxBitmap& bitmap) { - SetMGLDC(NULL, TRUE); - m_selected = bitmap; - if ( bitmap.Ok() ) + { + m_selected = bitmap; SetMGLDC(m_selected.CreateTmpDC(), TRUE); + } } void wxMemoryDC::SetPen(const wxPen &pen)