Fix crash when using old firmware

This commit is contained in:
Noisyfox
2025-05-24 18:37:35 +08:00
parent 0d61ae87ed
commit 65936b34c1
15 changed files with 374 additions and 284 deletions

View File

@@ -21,18 +21,22 @@ namespace Slic3r { namespace GUI {
class PrinterPartsDialog : public DPIDialog
{
protected:
wxWindowID ID_NOZZLE_TYPE_CHECKBOX_SINGLE;
wxWindowID ID_NOZZLE_DIAMETER_CHECKBOX_SINGLE;
MachineObject* obj{ nullptr };
ComboBox* nozzle_type_checkbox;
ComboBox* nozzle_diameter_checkbox;
std::string last_nozzle_type;
std::map<int, std::string> nozzle_type_map;
std::map<NozzleType, wxString> nozzle_type_map;
std::map<NozzleType, int> nozzle_type_selection_map;
std::map<int, float> nozzle_stainless_diameter_map;
std::map<int, float> nozzle_hard_diameter_map;
public:
PrinterPartsDialog(wxWindow* parent);
~PrinterPartsDialog();
void set_nozzle_type(wxCommandEvent& evt);
void set_nozzle_diameter(wxCommandEvent& evt);
void set_nozzle_data(wxCommandEvent& evt);
void on_dpi_changed(const wxRect& suggested_rect) override;
void update_machine_obj(MachineObject* obj_);
bool Show(bool show) override;