Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Call GLVolumeCollection::check_outside_state() only when needed

This commit is contained in:
enricoturri1966 2021-09-20 13:40:34 +02:00
parent 568483db7b
commit 1af0c5c73b
5 changed files with 39 additions and 16 deletions

View file

@ -475,6 +475,9 @@ private:
const DynamicPrintConfig* m_config;
Model* m_model;
BackgroundSlicingProcess *m_process;
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
bool m_requires_check_outside_state{ false };
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
std::array<unsigned int, 2> m_old_size{ 0, 0 };
@ -611,6 +614,9 @@ public:
void post_event(wxEvent &&event);
void set_as_dirty();
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
void requires_check_outside_state() { m_requires_check_outside_state = true; }
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
unsigned int get_volumes_count() const;
const GLVolumeCollection& get_volumes() const { return m_volumes; }