mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-14 16:58:54 +08:00
Fixed glitches in rendering when activating layers editing
This commit is contained in:
parent
703f65c7bf
commit
00a7673a2b
@ -1470,6 +1470,8 @@ void GLCanvas3D::enable_layers_editing(bool enable)
|
|||||||
if (v->is_modifier)
|
if (v->is_modifier)
|
||||||
v->force_transparent = enable;
|
v->force_transparent = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_as_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::enable_legend_texture(bool enable)
|
void GLCanvas3D::enable_legend_texture(bool enable)
|
||||||
@ -1638,7 +1640,7 @@ void GLCanvas3D::render()
|
|||||||
#endif // !ENABLE_SVG_ICONS
|
#endif // !ENABLE_SVG_ICONS
|
||||||
_render_toolbar();
|
_render_toolbar();
|
||||||
_render_view_toolbar();
|
_render_view_toolbar();
|
||||||
if (m_layers_editing.last_object_id >= 0)
|
if ((m_layers_editing.last_object_id >= 0) && (m_layers_editing.object_max_z() > 0.0f))
|
||||||
m_layers_editing.render_overlay(*this);
|
m_layers_editing.render_overlay(*this);
|
||||||
|
|
||||||
wxGetApp().imgui()->render();
|
wxGetApp().imgui()->render();
|
||||||
@ -3655,7 +3657,7 @@ void GLCanvas3D::_render_objects() const
|
|||||||
m_volumes.set_clipping_plane(m_camera_clipping_plane.get_data());
|
m_volumes.set_clipping_plane(m_camera_clipping_plane.get_data());
|
||||||
|
|
||||||
m_shader.start_using();
|
m_shader.start_using();
|
||||||
if (m_picking_enabled && m_layers_editing.is_enabled() && m_layers_editing.last_object_id != -1) {
|
if (m_picking_enabled && m_layers_editing.is_enabled() && (m_layers_editing.last_object_id != -1) && (m_layers_editing.object_max_z() > 0.0f)) {
|
||||||
int object_id = m_layers_editing.last_object_id;
|
int object_id = m_layers_editing.last_object_id;
|
||||||
m_volumes.render_VBOs(GLVolumeCollection::Opaque, false, m_camera.get_view_matrix(), [object_id](const GLVolume &volume) {
|
m_volumes.render_VBOs(GLVolumeCollection::Opaque, false, m_camera.get_view_matrix(), [object_id](const GLVolume &volume) {
|
||||||
// Which volume to paint without the layer height profile shader?
|
// Which volume to paint without the layer height profile shader?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user