mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -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
|
@ -1104,9 +1104,16 @@ void GLGizmosManager::activate_gizmo(EType type)
|
|||
}
|
||||
|
||||
m_current = type;
|
||||
m_common_gizmos_data->update(get_current()
|
||||
? get_current()->get_requirements()
|
||||
: CommonGizmosDataID(0));
|
||||
|
||||
// Updating common data should be left to the update_data function, which
|
||||
// is always called after this one. activate_gizmo can be called by undo/redo,
|
||||
// when selection is not yet deserialized, so the common data would update
|
||||
// incorrectly (or crash if relying on unempty selection). Undo/redo stack
|
||||
// will also call update_data, after selection is restored.
|
||||
|
||||
//m_common_gizmos_data->update(get_current()
|
||||
// ? get_current()->get_requirements()
|
||||
// : CommonGizmosDataID(0));
|
||||
|
||||
if (type != Undefined)
|
||||
m_gizmos[type]->set_state(GLGizmoBase::On);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue