FIX:check_ams_status api should put in "wxEVT_NOTEBOOK_PAGE"

jira: STUDIO-14512
Change-Id: I5220934590b02ccbcc93281bbd83a2dd846d4bce
(cherry picked from commit 4de749501dfbb817ee0158e80cebbc690263f4bd)
This commit is contained in:
zhou.xu
2025-09-09 14:05:28 +08:00
committed by Noisyfox
parent be88fc5a84
commit 4603d4a2c9
2 changed files with 8 additions and 10 deletions

View File

@@ -1085,6 +1085,9 @@ void MainFrame::init_tabpanel() {
m_param_panel->OnActivate();
}
else if (sel == tpPreview) {
m_plater->reset_check_status();
if (!m_plater->check_ams_status(m_slice_select == eSliceAll))
return;
wxPostEvent(m_plater, SimpleEvent(EVT_GLVIEWTOOLBAR_PREVIEW));
m_param_panel->OnActivate();
}
@@ -1684,9 +1687,6 @@ wxBoxSizer* MainFrame::create_side_tools()
m_slice_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
{
m_plater->reset_check_status();
if (!m_plater->check_ams_status(m_slice_select == eSliceAll))
return;
//this->m_plater->select_view_3D("Preview");
m_plater->exit_gizmo();

View File

@@ -5103,9 +5103,6 @@ void Plater::priv::select_view_3D(const std::string& name, bool no_slice)
set_current_panel(view3D, no_slice);
}
else if (name == "Preview") {
if (!q->check_ams_status(false))
return;
BOOST_LOG_TRIVIAL(info) << "select preview";
//BBS update extruder params and speed table before slicing
const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config();
@@ -9111,9 +9108,6 @@ void Plater::priv::on_action_open_project(SimpleEvent&)
void Plater::priv::on_action_slice_plate(SimpleEvent&)
{
if (q != nullptr) {
if (!q->check_ams_status(false))
return;
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received slice plate event\n" ;
//BBS update extruder params and speed table before slicing
const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config();
@@ -16402,8 +16396,12 @@ int Plater::select_plate(int plate_index, bool need_slice)
//p->process_completed_with_error = -1;
p->m_slice_all = false;
reset_gcode_toolpaths();
if (model_fits && !validate_err)
if (model_fits && !validate_err) {
if (!check_ams_status(false)){
return ret;
}
reslice();
}
else {
p->main_frame->update_slice_print_status(MainFrame::eEventPlateUpdate, false);
//sometimes the previous print's sliced result is still valid, but the newly added object is laid over the boundary