FIX:fixed crash after switching languages
Change-Id: I949b3bf99e0daefb5e3fac71c6df45e94b51608c
This commit is contained in:
parent
53ea77b67b
commit
e9ad8374bc
4 changed files with 10 additions and 3 deletions
|
@ -1948,8 +1948,9 @@ void GUI_App::init_networking_callbacks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.SetEventObject(this);
|
if (wxGetApp().plater()->get_select_machine_dialog()) {
|
||||||
wxPostEvent(this, event);
|
wxPostEvent(wxGetApp().plater()->get_select_machine_dialog(), event);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -11143,6 +11143,11 @@ std::vector<std::string> Plater::get_colors_for_color_print(const GCodeProcessor
|
||||||
return colors;
|
return colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindow* Plater::get_select_machine_dialog()
|
||||||
|
{
|
||||||
|
return p->m_select_machine_dlg;
|
||||||
|
}
|
||||||
|
|
||||||
void Plater::update_print_error_info(int code, std::string msg, std::string extra)
|
void Plater::update_print_error_info(int code, std::string msg, std::string extra)
|
||||||
{
|
{
|
||||||
if (p->m_select_machine_dlg) {
|
if (p->m_select_machine_dlg) {
|
||||||
|
|
|
@ -429,6 +429,7 @@ public:
|
||||||
GLCanvas3D* get_view3D_canvas3D();
|
GLCanvas3D* get_view3D_canvas3D();
|
||||||
GLCanvas3D* get_preview_canvas3D();
|
GLCanvas3D* get_preview_canvas3D();
|
||||||
GLCanvas3D* get_assmeble_canvas3D();
|
GLCanvas3D* get_assmeble_canvas3D();
|
||||||
|
wxWindow* get_select_machine_dialog();
|
||||||
|
|
||||||
void arrange();
|
void arrange();
|
||||||
void orient();
|
void orient();
|
||||||
|
|
|
@ -1405,7 +1405,7 @@ void SelectMachineDialog::init_bind()
|
||||||
m_bitmap_next_plate->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
|
m_bitmap_next_plate->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
|
||||||
|
|
||||||
|
|
||||||
wxGetApp().Bind(EVT_CONNECT_LAN_MODE_PRINT, [this](wxCommandEvent& e) {
|
Bind(EVT_CONNECT_LAN_MODE_PRINT, [this](wxCommandEvent& e) {
|
||||||
if (e.GetInt() == 0) {
|
if (e.GetInt() == 0) {
|
||||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
if (!dev) return;
|
if (!dev) return;
|
||||||
|
|
Loading…
Reference in a new issue