mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 20:02:17 +00:00
ENH:Add 'Don't show again' to the step mesh
jira: STUDIO-8606 Change-Id: I2382b9052e2c994a458ad36ca61eb94c517927c6 (cherry picked from commit 0cce6619ce12aa8540f6dfca6d9ee79ffba65c19)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define _STEP_MESH_DIALOG_H_
|
||||
|
||||
#include <thread>
|
||||
#include "GUI_App.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "libslic3r/Format/STEP.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
@@ -12,12 +13,18 @@ class StepMeshDialog : public Slic3r::GUI::DPIDialog
|
||||
public:
|
||||
StepMeshDialog(wxWindow* parent, Slic3r::Step& file);
|
||||
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 0.003;
|
||||
return get_linear_init();
|
||||
}
|
||||
}
|
||||
inline double get_angle_defletion() {
|
||||
@@ -25,15 +32,16 @@ public:
|
||||
if (m_angle_last.ToDouble(&value)) {
|
||||
return value;
|
||||
} else {
|
||||
return 0.5;
|
||||
return get_angle_init();
|
||||
}
|
||||
}
|
||||
private:
|
||||
Slic3r::Step& m_file;
|
||||
Button* m_button_ok = nullptr;
|
||||
Button* m_button_cancel = nullptr;
|
||||
wxString m_linear_last = wxString::Format("%.3f", 0.003);
|
||||
wxString m_angle_last = wxString::Format("%.2f", 0.5);
|
||||
wxCheckBox* m_checkbox = nullptr;
|
||||
wxString m_linear_last = wxString::Format("%.3f", get_linear_init());
|
||||
wxString m_angle_last = wxString::Format("%.2f", get_angle_init());
|
||||
wxStaticText* mesh_face_number_text;
|
||||
double m_last_linear;
|
||||
double m_last_angle;
|
||||
|
||||
Reference in New Issue
Block a user