mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Fix of several issues related to gizmos updating and undo/redo
Common gizmos data cannot be used in on_set_state method Also prevented calling render on empty GLVertexArrays
This commit is contained in:
parent
10c59b0d00
commit
2cc1dffc82
8 changed files with 70 additions and 50 deletions
|
@ -28,8 +28,7 @@ bool GLGizmoFlatten::on_init()
|
|||
|
||||
void GLGizmoFlatten::on_set_state()
|
||||
{
|
||||
if (m_state == On && is_plane_update_necessary())
|
||||
update_planes();
|
||||
|
||||
}
|
||||
|
||||
CommonGizmosDataID GLGizmoFlatten::on_get_requirements() const
|
||||
|
@ -81,7 +80,8 @@ void GLGizmoFlatten::on_render() const
|
|||
else
|
||||
glsafe(::glColor4f(0.9f, 0.9f, 0.9f, 0.5f));
|
||||
|
||||
m_planes[i].vbo.render();
|
||||
if (m_planes[i].vbo.has_VBOs())
|
||||
m_planes[i].vbo.render();
|
||||
}
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue