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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user