Skip to content

Commit

Permalink
FIX:display msg when cannot edit filament
Browse files Browse the repository at this point in the history
jira:[edit filament]

Change-Id: I7e2b4fabeb3930f34fc252f1334e168e4f623b77
  • Loading branch information
walterwongbbl authored and lanewei120 committed Oct 15, 2024
1 parent c3143b1 commit 95655e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
2 changes: 2 additions & 0 deletions src/slic3r/GUI/AMSMaterialsSetting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ void AMSMaterialsSetting::update()

void AMSMaterialsSetting::enable_confirm_button(bool en)
{
m_tip_readonly->SetLabelText(wxEmptyString);

if (!en) {
m_button_confirm->Show(obj->is_support_filament_setting_inprinting);
}
Expand Down
44 changes: 17 additions & 27 deletions src/slic3r/GUI/StatusPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3086,6 +3086,19 @@ void StatusPanel::update_subtask(MachineObject *obj)
m_project_task_panel->enable_pause_resume_button(true, "pause");
}

// update printing stage
m_project_task_panel->update_left_time(obj->mc_left_time);
if (obj->subtask_) {
m_project_task_panel->update_stage_value(obj->get_curr_stage(), obj->subtask_->task_progress);
m_project_task_panel->update_progress_percent(wxString::Format("%d", obj->subtask_->task_progress), "%");
m_project_task_panel->update_layers_num(true, wxString::Format(_L("Layer: %d/%d"), obj->curr_layer, obj->total_layers));

} else {
m_project_task_panel->update_stage_value(obj->get_curr_stage(), 0);
m_project_task_panel->update_progress_percent(NA_STR, wxEmptyString);
m_project_task_panel->update_layers_num(true, wxString::Format(_L("Layer: %s"), NA_STR));
}

if (obj->is_printing_finished()) {
obj->update_model_task();
m_project_task_panel->enable_abort_button(false);
Expand All @@ -3112,10 +3125,7 @@ void StatusPanel::update_subtask(MachineObject *obj)
}
}

if (!m_project_task_panel->is_market_scoring_show()) {
m_project_task_panel->market_scoring_show();
Layout();
}
m_project_task_panel->market_scoring_show();

} else if (obj && obj->rating_info && !obj->rating_info->request_successful) {
BOOST_LOG_TRIVIAL(info) << "model mall result request failed";
Expand All @@ -3128,39 +3138,19 @@ void StatusPanel::update_subtask(MachineObject *obj)
}
}
} else {

if (m_project_task_panel->is_market_scoring_show()) {
m_project_task_panel->market_scoring_hide();
Layout();
}
m_project_task_panel->market_scoring_hide();
}
} else { // model printing is not finished, hide scoring page
m_project_task_panel->enable_abort_button(true);
if (m_project_task_panel->is_market_scoring_show()) {
m_project_task_panel->market_scoring_hide();
Layout();
}
m_project_task_panel->market_scoring_hide();
m_project_task_panel->get_request_failed_panel()->Hide();
}
// update printing stage

m_project_task_panel->update_left_time(obj->mc_left_time);
if (obj->subtask_) {
m_project_task_panel->update_stage_value(obj->get_curr_stage(), obj->subtask_->task_progress);
m_project_task_panel->update_progress_percent(wxString::Format("%d", obj->subtask_->task_progress), "%");
m_project_task_panel->update_layers_num(true, wxString::Format(_L("Layer: %d/%d"), obj->curr_layer, obj->total_layers));

} else {
m_project_task_panel->update_stage_value(obj->get_curr_stage(), 0);
m_project_task_panel->update_progress_percent(NA_STR, wxEmptyString);
m_project_task_panel->update_layers_num(true, wxString::Format(_L("Layer: %s"), NA_STR));
}
}
} else {
reset_printing_values();
}

m_project_task_panel->Layout();
Layout();
}

void StatusPanel::update_cloud_subtask(MachineObject *obj)
Expand Down

0 comments on commit 95655e0

Please sign in to comment.