InstancesHider implementation

Any gizmo can now ask for hiding all but the active instance by returning proper value from on_get_requirements
This commit is contained in:
Lukas Matena 2020-04-03 18:04:37 +02:00
parent 593e7a1546
commit 3db3a61520
3 changed files with 48 additions and 9 deletions

View file

@ -1196,10 +1196,13 @@ void GLGizmosManager::activate_gizmo(EType type)
return; // gizmo refused to be turned off, do nothing.
}
m_current = type;
m_common_gizmos_data->update(get_current()
? get_current()->get_requirements()
: CommonGizmosDataID(0));
if (type != Undefined)
m_gizmos[type]->set_state(GLGizmoBase::On);
m_current = type;
}