mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Fix: Fix the bug where automatic flushing calculation did not work
Jira: STUDIO-14814 Change-Id: Idd2762e52e1deb9ce4f47b5f6c4473cd98aaa534 (cherry picked from commit 88157485072df23505eab0cf15ccabc6d1c6aa7e)
This commit is contained in:
@@ -1862,6 +1862,7 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
p->m_flushing_volume_btn->Bind(wxEVT_BUTTON, ([parent, this](wxCommandEvent &e) {
|
p->m_flushing_volume_btn->Bind(wxEVT_BUTTON, ([parent, this](wxCommandEvent &e) {
|
||||||
open_flushing_dialog(parent, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, parent));
|
open_flushing_dialog(parent, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, parent));
|
||||||
p->plater->get_view3D_canvas3D()->reload_scene(true);
|
p->plater->get_view3D_canvas3D()->reload_scene(true);
|
||||||
|
p->plater->update();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
bSizer39->Add(p->m_flushing_volume_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(4));
|
bSizer39->Add(p->m_flushing_volume_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(4));
|
||||||
@@ -3659,6 +3660,9 @@ void Sidebar::auto_calc_flushing_volumes(const int filament_idx, const int extru
|
|||||||
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
||||||
wxGetApp().plater()->update_project_dirty_from_presets();
|
wxGetApp().plater()->update_project_dirty_from_presets();
|
||||||
wxPostEvent(this, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, this));
|
wxPostEvent(this, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, this));
|
||||||
|
auto has_modify = is_flush_config_modified();
|
||||||
|
set_flushing_volume_warning(has_modify);
|
||||||
|
p->plater->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -14799,6 +14803,7 @@ void Plater::reslice()
|
|||||||
// Only restarts if the state is valid.
|
// Only restarts if the state is valid.
|
||||||
//BBS: jusdge the result
|
//BBS: jusdge the result
|
||||||
bool result = this->p->restart_background_process(state | priv::UPDATE_BACKGROUND_PROCESS_FORCE_RESTART);
|
bool result = this->p->restart_background_process(state | priv::UPDATE_BACKGROUND_PROCESS_FORCE_RESTART);
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", Line %1%: restart background,state=%2%, result=%3%")%__LINE__%state %result;
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", Line %1%: restart background,state=%2%, result=%3%")%__LINE__%state %result;
|
||||||
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
|
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user