Fix of gizmo deserialization after Undo / Redo: Deselect all gizmos

but the gizmo to be deserialized.
This commit is contained in:
bubnikv 2019-07-31 14:00:43 +02:00
parent 3bade450b8
commit 1ba9100994

View File

@ -108,10 +108,14 @@ public:
ar(m_current);
GLGizmoBase* curr = get_current();
if (curr != nullptr)
{
curr->set_state(GLGizmoBase::On);
curr->load(ar);
for (GizmosMap::const_iterator it = m_gizmos.begin(); it != m_gizmos.end(); ++it) {
GLGizmoBase* gizmo = it->second;
if (gizmo != nullptr) {
gizmo->set_hover_id(-1);
gizmo->set_state((it->second == curr) ? GLGizmoBase::On : GLGizmoBase::Off);
if (gizmo == curr)
gizmo->load(ar);
}
}
}