mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
ENH: remeber extrusion cali preset in MachineObject
Change-Id: I32fcf6355ce948fc02c584b8639eb96fe2b444b5 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
0d656621bf
commit
030275a5a1
3 changed files with 21 additions and 5 deletions
|
@ -487,6 +487,7 @@ public:
|
||||||
std::chrono::system_clock::time_point last_extrusion_cali_start_time;
|
std::chrono::system_clock::time_point last_extrusion_cali_start_time;
|
||||||
int extrusion_cali_set_tray_id = -1;
|
int extrusion_cali_set_tray_id = -1;
|
||||||
std::chrono::system_clock::time_point extrusion_cali_set_hold_start;
|
std::chrono::system_clock::time_point extrusion_cali_set_hold_start;
|
||||||
|
std::string extrusion_cali_filament_name;
|
||||||
|
|
||||||
bool is_in_extrusion_cali();
|
bool is_in_extrusion_cali();
|
||||||
bool is_extrusion_cali_finished();
|
bool is_extrusion_cali_finished();
|
||||||
|
|
|
@ -675,6 +675,11 @@ void ExtrusionCalibration::update_combobox_filaments()
|
||||||
curr_selection = filament_index;
|
curr_selection = filament_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (filament_it->name == obj->extrusion_cali_filament_name && !obj->extrusion_cali_filament_name.empty())
|
||||||
|
{
|
||||||
|
curr_selection = filament_index;
|
||||||
|
}
|
||||||
|
|
||||||
wxString filament_name = wxString::FromUTF8(filament_it->name);
|
wxString filament_name = wxString::FromUTF8(filament_it->name);
|
||||||
filament_items.Add(filament_name);
|
filament_items.Add(filament_name);
|
||||||
break;
|
break;
|
||||||
|
@ -784,6 +789,11 @@ void ExtrusionCalibration::update_filament_info()
|
||||||
if (filament_name.compare(m_comboBox_filament->GetValue()) == 0) {
|
if (filament_name.compare(m_comboBox_filament->GetValue()) == 0) {
|
||||||
m_filament_type = filament_it->name;
|
m_filament_type = filament_it->name;
|
||||||
|
|
||||||
|
if (obj) {
|
||||||
|
obj->extrusion_cali_filament_name = filament_it->name;
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "set extrusion cali filament name = " << obj->extrusion_cali_filament_name;
|
||||||
|
}
|
||||||
|
|
||||||
// update nozzle temperature
|
// update nozzle temperature
|
||||||
ConfigOption* opt_nozzle_temp = filament_it->config.option("nozzle_temperature");
|
ConfigOption* opt_nozzle_temp = filament_it->config.option("nozzle_temperature");
|
||||||
if (opt_nozzle_temp) {
|
if (opt_nozzle_temp) {
|
||||||
|
|
|
@ -2237,12 +2237,17 @@ void StatusPanel::update_ams_control_state(bool is_support_virtual_tray, bool is
|
||||||
enable[ACTION_BTN_CALI] = false;
|
enable[ACTION_BTN_CALI] = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (obj->is_in_extrusion_cali()) {
|
if (obj->is_in_printing()) {
|
||||||
enable[ACTION_BTN_LOAD] = false;
|
if (obj->is_in_extrusion_cali()) {
|
||||||
enable[ACTION_BTN_UNLOAD] = false;
|
enable[ACTION_BTN_LOAD] = false;
|
||||||
|
enable[ACTION_BTN_UNLOAD] = false;
|
||||||
|
enable[ACTION_BTN_CALI] = true;
|
||||||
|
} else {
|
||||||
|
enable[ACTION_BTN_CALI] = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
enable[ACTION_BTN_CALI] = true;
|
enable[ACTION_BTN_CALI] = true;
|
||||||
} else
|
}
|
||||||
enable[ACTION_BTN_CALI] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->is_in_printing() && !obj->can_resume()) {
|
if (obj->is_in_printing() && !obj->can_resume()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue