Fix weird `wxWidgets>=3.0` error message.

ASSERT INFO:
/usr/include/wx-3.0/wx/object.h(160): assert "wxDynamicCast(ptr, T)"
failed in wxCheckCast(): wxStaticCast() used incorrectly
This commit is contained in:
Edênis Freindorfer Azevedo 2020-02-29 21:04:57 -03:00 committed by Rafael Kitover
parent 7f1a3a932c
commit 8f48c1f01d
1 changed files with 1 additions and 1 deletions

View File

@ -705,7 +705,7 @@ PrintDialog::PrintDialog(const uint16_t* data, int lines, bool cont):
npw(1),
nph(1)
{
dlg = wxStaticCast(wxGetApp().frame->FindWindow(XRCID("GBPrinter")), wxDialog);
dlg = wxStaticCast(wxGetApp().frame->FindWindowByName("GBPrinter"), wxDialog);
p = XRCCTRL(*dlg, "Preview", wxPanel);
wxScrolledWindow* pp = wxStaticCast(p->GetParent(), wxScrolledWindow);
wxSize sz(320, lines * 2);