Fix drawing call tips in wxSTC when using Direct2D

Use the correct window as the containing control in SurfaceD2D.

Closes #18080.
This commit is contained in:
New Pagodi 2018-02-17 19:49:44 +01:00 committed by Vadim Zeitlin
parent 1dc1d66fe1
commit c83ddec75f

View File

@ -1036,7 +1036,7 @@ void SurfaceD2D::Init(SurfaceID sid, WindowID wid)
if ( win && win->GetName() == "wxSTCCallTip" ) if ( win && win->GetName() == "wxSTCCallTip" )
win = win->GetParent(); win = win->GetParent();
wxStyledTextCtrl* const stc = wxDynamicCast(wid, wxStyledTextCtrl); wxStyledTextCtrl* const stc = wxDynamicCast(win, wxStyledTextCtrl);
if ( stc ) if ( stc )
{ {
wxDC* const dc = static_cast<wxDC*>(sid); wxDC* const dc = static_cast<wxDC*>(sid);