diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 3fccb7f84..9fc3a6ac5 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -116,6 +116,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S m_printhost_queue_dlg(new PrintHostQueueDialog(this)) , m_recent_projects(9) , m_settings_dialog(this) + , diff_dialog(this) { // Fonts were created by the DPIFrame constructor for the monitor, on which the window opened. wxGetApp().update_fonts(this); diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index 68b115f09..4773af8ee 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -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(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); diff --git a/src/slic3r/GUI/UnsavedChangesDialog.hpp b/src/slic3r/GUI/UnsavedChangesDialog.hpp index 12c215e56..06838d936 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.hpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.hpp @@ -21,6 +21,7 @@ namespace GUI{ class ModelNode; class PresetComboBox; +class MainFrame; using ModelNodePtrArray = std::vector>; // On all of 3 different platforms Bitmap+Text icon column looks different @@ -333,7 +334,7 @@ class DiffPresetDialog : public DPIDialog std::vector m_preset_combos; public: - DiffPresetDialog(); + DiffPresetDialog(MainFrame* mainframe); ~DiffPresetDialog() {} void show(Preset::Type type = Preset::TYPE_INVALID);