mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
NEW:flow calibration is not supported when using Textured PEI Plate
Change-Id: Ib6a584cbfba762088472b55a09061af83a5a937a
This commit is contained in:
parent
37dfa47f34
commit
f343b4d1db
2 changed files with 39 additions and 0 deletions
|
@ -1471,6 +1471,7 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||||
|
|
||||||
|
|
||||||
check->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &e) {
|
check->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &e) {
|
||||||
|
if (!m_checkbox_state_list[param]) {return;}
|
||||||
AppConfig* config = wxGetApp().app_config;
|
AppConfig* config = wxGetApp().app_config;
|
||||||
if (config) {
|
if (config) {
|
||||||
if (check->GetValue())
|
if (check->GetValue())
|
||||||
|
@ -1482,6 +1483,7 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||||
});
|
});
|
||||||
|
|
||||||
checkbox->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent&) {
|
checkbox->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent&) {
|
||||||
|
if (!m_checkbox_state_list[param]) {return;}
|
||||||
check->SetValue(check->GetValue() ? false : true);
|
check->SetValue(check->GetValue() ? false : true);
|
||||||
AppConfig* config = wxGetApp().app_config;
|
AppConfig* config = wxGetApp().app_config;
|
||||||
if (config) {
|
if (config) {
|
||||||
|
@ -1493,6 +1495,7 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||||
});
|
});
|
||||||
|
|
||||||
text->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &) {
|
text->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &) {
|
||||||
|
if (!m_checkbox_state_list[param]) {return;}
|
||||||
check->SetValue(check->GetValue() ? false : true);
|
check->SetValue(check->GetValue() ? false : true);
|
||||||
AppConfig* config = wxGetApp().app_config;
|
AppConfig* config = wxGetApp().app_config;
|
||||||
if (config) {
|
if (config) {
|
||||||
|
@ -1502,6 +1505,8 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||||
config->set_str("print", param, "0");
|
config->set_str("print", param, "0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_checkbox_state_list[param] = true;
|
||||||
m_checkbox_list[param] = check;
|
m_checkbox_list[param] = check;
|
||||||
return checkbox;
|
return checkbox;
|
||||||
}
|
}
|
||||||
|
@ -3036,6 +3041,28 @@ wxImage *SelectMachineDialog::LoadImageFromBlob(const unsigned char *data, int s
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SelectMachineDialog::set_flow_calibration_state(bool state)
|
||||||
|
{
|
||||||
|
if (!state) {
|
||||||
|
m_checkbox_list["flow_cali"]->SetValue(state);
|
||||||
|
m_checkbox_list["flow_cali"]->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
|
||||||
|
m_checkbox_list["flow_cali"]->Disable();
|
||||||
|
m_checkbox_state_list["flow_cali"] = state;
|
||||||
|
for (auto win : select_flow->GetWindowChildren()) {
|
||||||
|
win->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
|
||||||
|
}
|
||||||
|
select_flow->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_checkbox_list["flow_cali"]->SetValue(state);
|
||||||
|
m_checkbox_list["flow_cali"]->Enable();
|
||||||
|
m_checkbox_state_list["flow_cali"] = state;
|
||||||
|
for (auto win : select_flow->GetWindowChildren()) {
|
||||||
|
win->SetToolTip( _L("Flow Calibration"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMachineDialog::set_default()
|
void SelectMachineDialog::set_default()
|
||||||
{
|
{
|
||||||
//project name
|
//project name
|
||||||
|
@ -3261,6 +3288,15 @@ void SelectMachineDialog::set_default()
|
||||||
m_scrollable_view->SetMinSize(m_scrollable_region->GetSize());
|
m_scrollable_view->SetMinSize(m_scrollable_region->GetSize());
|
||||||
m_scrollable_view->SetMaxSize(m_scrollable_region->GetSize());
|
m_scrollable_view->SetMaxSize(m_scrollable_region->GetSize());
|
||||||
|
|
||||||
|
//disable pei bed
|
||||||
|
auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
|
||||||
|
if (bed_type == BedType::btPTE) {
|
||||||
|
set_flow_calibration_state(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
set_flow_calibration_state(true);
|
||||||
|
}
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
Fit();
|
Fit();
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,9 @@ private:
|
||||||
PrintDialogStatus m_print_status { PrintStatusInit };
|
PrintDialogStatus m_print_status { PrintStatusInit };
|
||||||
|
|
||||||
std::vector<wxString> m_bedtype_list;
|
std::vector<wxString> m_bedtype_list;
|
||||||
|
|
||||||
std::map<std::string, ::CheckBox *> m_checkbox_list;
|
std::map<std::string, ::CheckBox *> m_checkbox_list;
|
||||||
|
std::map<std::string, bool> m_checkbox_state_list;
|
||||||
|
|
||||||
wxColour m_colour_def_color{wxColour(255, 255, 255)};
|
wxColour m_colour_def_color{wxColour(255, 255, 255)};
|
||||||
wxColour m_colour_bold_color{wxColour(38, 46, 48)};
|
wxColour m_colour_bold_color{wxColour(38, 46, 48)};
|
||||||
|
@ -439,6 +441,7 @@ protected:
|
||||||
void on_dpi_changed(const wxRect &suggested_rect) override;
|
void on_dpi_changed(const wxRect &suggested_rect) override;
|
||||||
void update_user_machine_list();
|
void update_user_machine_list();
|
||||||
void update_lan_machine_list();
|
void update_lan_machine_list();
|
||||||
|
void set_flow_calibration_state(bool state);
|
||||||
wxImage * LoadImageFromBlob(const unsigned char *data, int size);
|
wxImage * LoadImageFromBlob(const unsigned char *data, int size);
|
||||||
std::vector<std::string> sort_string(std::vector<std::string> strArray);
|
std::vector<std::string> sort_string(std::vector<std::string> strArray);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue