Fixed a crash on language changing

(DiffPresetDialog should get mainframe as a parent explicitly)
This commit is contained in:
YuSanka 2021-02-09 09:55:26 +01:00
parent 0b4720338f
commit e833e63c42
3 changed files with 5 additions and 3 deletions

View file

@ -1386,8 +1386,8 @@ static std::string get_selection(PresetComboBox* preset_combo)
return into_u8(preset_combo->GetString(preset_combo->GetSelection()));
}
DiffPresetDialog::DiffPresetDialog()
: DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
DiffPresetDialog::DiffPresetDialog(MainFrame* mainframe)
: DPIDialog(mainframe, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
m_pr_technology(wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology())
{
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);