FIX:crash when close preference

JIRA: STUDIO-4340

Change-Id: I95b1c77720bf1264ca70f2fa3652e814d8f20e53
This commit is contained in:
Kunlong Ma 2023-09-06 09:41:13 +08:00 committed by Lane.Wei
parent 04ce14ca90
commit 378a0a9d75
3 changed files with 3 additions and 5 deletions

View File

@ -851,7 +851,7 @@ PreferencesDialog::PreferencesDialog(wxWindow *parent, wxWindowID id, const wxSt
agent->track_event("preferences_changed", j.dump());
}
} catch(...) {}
Destroy();
event.Skip();
});
}

View File

@ -282,7 +282,7 @@ void WipingPanel::create_panels(wxWindow* parent, const int num) {
for (unsigned int j = 0; j < num; ++j) {
edit_boxes[j][i]->Reparent(panel);
edit_boxes[j][i]->SetBackgroundColour(panel->GetBackgroundColour());
edit_boxes[j][i]->SetFont(::Label::Body_14);
edit_boxes[j][i]->SetFont(::Label::Body_13);
sizer->AddSpacer(EDIT_BOXES_GAP);
sizer->Add(edit_boxes[j][i], 0, wxALIGN_CENTER_VERTICAL, 0);
}
@ -368,10 +368,9 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, con
// BBS
m_sizer_advanced->AddSpacer(FromDIP(10));
tip_message_panel = new wxPanel(m_page_advanced, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
auto tip_message_panel = new wxPanel(m_page_advanced, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
tip_message_panel->SetBackgroundColour(wxColour(238, 238, 238));
auto message_sizer = new wxBoxSizer(wxVERTICAL);
auto hyperlink_sizer = new wxBoxSizer(wxHORIZONTAL);
tip_message_panel->SetSizer(message_sizer);
{
wxString message = _L("Studio would re-calculate your flushing volumes everytime the filaments color changed. You could disable the auto-calculate in Bambu Studio > Preferences");

View File

@ -47,7 +47,6 @@ private:
wxPanel* m_page_simple = nullptr;
wxPanel* m_page_advanced = nullptr;
wxPanel* header_line_panel = nullptr;
wxPanel* tip_message_panel = nullptr;
wxBoxSizer* m_sizer = nullptr;
wxBoxSizer* m_sizer_simple = nullptr;
wxBoxSizer* m_sizer_advanced = nullptr;