Refactoring of suppress background process update for clarity.
This commit is contained in:
parent
1d5249f9b0
commit
45e0079356
@ -5612,7 +5612,7 @@ void Plater::schedule_background_process(bool schedule/* = true*/)
|
||||
this->p->suppressed_backround_processing_update = false;
|
||||
}
|
||||
|
||||
bool Plater::is_background_process_running() const
|
||||
bool Plater::is_background_process_update_scheduled() const
|
||||
{
|
||||
return this->p->background_process_timer.IsRunning();
|
||||
}
|
||||
@ -5754,14 +5754,14 @@ bool Plater::PopupMenu(wxMenu *menu, const wxPoint& pos)
|
||||
}
|
||||
|
||||
SuppressBackgroundProcessingUpdate::SuppressBackgroundProcessingUpdate() :
|
||||
m_was_running(wxGetApp().plater()->is_background_process_running())
|
||||
m_was_scheduled(wxGetApp().plater()->is_background_process_update_scheduled())
|
||||
{
|
||||
wxGetApp().plater()->suppress_background_process(m_was_running);
|
||||
wxGetApp().plater()->suppress_background_process(m_was_scheduled);
|
||||
}
|
||||
|
||||
SuppressBackgroundProcessingUpdate::~SuppressBackgroundProcessingUpdate()
|
||||
{
|
||||
wxGetApp().plater()->schedule_background_process(m_was_running);
|
||||
wxGetApp().plater()->schedule_background_process(m_was_scheduled);
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
@ -208,7 +208,7 @@ public:
|
||||
void changed_object(int obj_idx);
|
||||
void changed_objects(const std::vector<size_t>& object_idxs);
|
||||
void schedule_background_process(bool schedule = true);
|
||||
bool is_background_process_running() const;
|
||||
bool is_background_process_update_scheduled() const;
|
||||
void suppress_background_process(const bool stop_background_process) ;
|
||||
void fix_through_netfabb(const int obj_idx, const int vol_idx = -1);
|
||||
void send_gcode();
|
||||
@ -345,7 +345,7 @@ public:
|
||||
SuppressBackgroundProcessingUpdate();
|
||||
~SuppressBackgroundProcessingUpdate();
|
||||
private:
|
||||
bool m_was_running;
|
||||
bool m_was_scheduled;
|
||||
};
|
||||
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user