Set m_window instead of using wxWindowDC constructor taking a wxWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,8 +45,8 @@ wxClientDC::wxClientDC(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
wxClientDC::wxClientDC( wxWindow *window )
|
wxClientDC::wxClientDC( wxWindow *window )
|
||||||
: wxWindowDC(window)
|
|
||||||
{
|
{
|
||||||
|
m_window = window;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxClientDC::~wxClientDC(void)
|
wxClientDC::~wxClientDC(void)
|
||||||
@@ -63,8 +63,8 @@ wxPaintDC::wxPaintDC(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
wxPaintDC::wxPaintDC( wxWindow *window )
|
wxPaintDC::wxPaintDC( wxWindow *window )
|
||||||
: wxWindowDC(window)
|
|
||||||
{
|
{
|
||||||
|
m_window = window;
|
||||||
wxASSERT_MSG([NSView focusView]==window->GetNSView(), "PaintDC's NSView does not have focus. Please use wxPaintDC only as the first DC created in a paint handler");
|
wxASSERT_MSG([NSView focusView]==window->GetNSView(), "PaintDC's NSView does not have focus. Please use wxPaintDC only as the first DC created in a paint handler");
|
||||||
// This transform flips the graphics since wxDC uses top-left origin
|
// This transform flips the graphics since wxDC uses top-left origin
|
||||||
if(![window->GetNSView() isFlipped])
|
if(![window->GetNSView() isFlipped])
|
||||||
|
Reference in New Issue
Block a user