mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Merge branch 'master' into tm_slice_index
This commit is contained in:
commit
0ffc0c3a84
20 changed files with 459 additions and 187 deletions
|
@ -174,7 +174,9 @@ 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)
|
||||
#ifdef __linux__
|
||||
, m_volumes_cleanup_required(false)
|
||||
#endif // __linux__
|
||||
{
|
||||
if (init(parent, bed, camera, view_toolbar))
|
||||
{
|
||||
|
@ -354,31 +356,28 @@ void Preview::load_print(bool keep_z_range)
|
|||
|
||||
void Preview::reload_print(bool keep_volumes)
|
||||
{
|
||||
#ifndef __linux__
|
||||
if (m_volumes_cleanup_required || !keep_volumes)
|
||||
{
|
||||
m_canvas->reset_volumes();
|
||||
m_canvas->reset_legend_texture();
|
||||
m_loaded = false;
|
||||
m_volumes_cleanup_required = false;
|
||||
}
|
||||
#endif // __linux__
|
||||
|
||||
#ifdef __linux__
|
||||
// We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955.
|
||||
// So we are applying a workaround here: a delayed release of OpenGL vertex buffers.
|
||||
if (!IsShown())
|
||||
{
|
||||
m_volumes_cleanup_required = !keep_volumes;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* __linux __ */
|
||||
if (
|
||||
#ifdef __linux__
|
||||
if (m_volumes_cleanup_required || !keep_volumes)
|
||||
m_volumes_cleanup_required ||
|
||||
#endif /* __linux__ */
|
||||
!keep_volumes)
|
||||
{
|
||||
m_canvas->reset_volumes();
|
||||
m_canvas->reset_legend_texture();
|
||||
m_loaded = false;
|
||||
#ifdef __linux__
|
||||
m_volumes_cleanup_required = false;
|
||||
#endif /* __linux__ */
|
||||
}
|
||||
#endif // __linux__
|
||||
|
||||
load_print();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue