mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Follow-up of a5b202aa1d
(fixed cleanup of toolpaths in preview after scene update)
This commit is contained in:
parent
de65d369a4
commit
f249155340
3 changed files with 12 additions and 5 deletions
|
@ -186,6 +186,7 @@ Preview::Preview(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_t
|
|||
, m_loaded(false)
|
||||
, m_enabled(false)
|
||||
, m_schedule_background_process(schedule_background_process_func)
|
||||
, m_volumes_cleanup_required(false)
|
||||
{
|
||||
if (init(parent, bed, camera, view_toolbar))
|
||||
{
|
||||
|
@ -363,16 +364,20 @@ void Preview::load_print()
|
|||
load_print_as_sla();
|
||||
}
|
||||
|
||||
void Preview::reload_print(bool force, bool keep_volumes)
|
||||
void Preview::reload_print(bool keep_volumes)
|
||||
{
|
||||
if (!IsShown() && !force)
|
||||
if (!IsShown())
|
||||
{
|
||||
m_volumes_cleanup_required = !keep_volumes;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!keep_volumes)
|
||||
if (m_volumes_cleanup_required || !keep_volumes)
|
||||
{
|
||||
m_canvas->reset_volumes();
|
||||
m_canvas->reset_legend_texture();
|
||||
m_loaded = false;
|
||||
m_volumes_cleanup_required = false;
|
||||
}
|
||||
|
||||
load_print();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue