mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 20:02:17 +00:00
FIX:STEP mesh crashes in specific language
1.fix dark model 2.fix reload file 3.fix macos ui jira: STUDIO-8722 Change-Id: I17c723cbf88b97b187c72fbc6f65fc2da591465f (cherry picked from commit 6c48a8e40b3a28859d5883b13106683cbe61c73d)
This commit is contained in:
@@ -11,20 +11,14 @@ class Button;
|
||||
class StepMeshDialog : public Slic3r::GUI::DPIDialog
|
||||
{
|
||||
public:
|
||||
StepMeshDialog(wxWindow* parent, Slic3r::Step& file);
|
||||
StepMeshDialog(wxWindow* parent, Slic3r::Step& file, double linear_init, double angle_init);
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
inline double get_linear_init() {
|
||||
return std::stod(Slic3r::GUI::wxGetApp().app_config->get("linear_defletion"));
|
||||
}
|
||||
inline double get_angle_init() {
|
||||
return std::stod(Slic3r::GUI::wxGetApp().app_config->get("angle_defletion"));
|
||||
}
|
||||
inline double get_linear_defletion() {
|
||||
double value;
|
||||
if (m_linear_last.ToDouble(&value)) {
|
||||
return value;
|
||||
}else {
|
||||
return get_linear_init();
|
||||
return m_last_linear;
|
||||
}
|
||||
}
|
||||
inline double get_angle_defletion() {
|
||||
@@ -32,7 +26,7 @@ public:
|
||||
if (m_angle_last.ToDouble(&value)) {
|
||||
return value;
|
||||
} else {
|
||||
return get_angle_init();
|
||||
return m_last_angle;
|
||||
}
|
||||
}
|
||||
private:
|
||||
@@ -40,8 +34,8 @@ private:
|
||||
Button* m_button_ok = nullptr;
|
||||
Button* m_button_cancel = nullptr;
|
||||
wxCheckBox* m_checkbox = nullptr;
|
||||
wxString m_linear_last = wxString::Format("%.3f", get_linear_init());
|
||||
wxString m_angle_last = wxString::Format("%.2f", get_angle_init());
|
||||
wxString m_linear_last;
|
||||
wxString m_angle_last;
|
||||
wxStaticText* mesh_face_number_text;
|
||||
double m_last_linear;
|
||||
double m_last_angle;
|
||||
|
||||
Reference in New Issue
Block a user