Tech ENABLE_OBJECT_MANIPULATOR_FOCUS - 1st installment - Do not automatically set focus on 3D scene while hovering on it while the focus is into a field of the object manipulator

This commit is contained in:
enricoturri1966 2022-01-17 12:17:59 +01:00
parent 403f6d45f9
commit cfe8aa4818
3 changed files with 36 additions and 1 deletions

View file

@ -1103,9 +1103,14 @@ ManipulationEditor::ManipulationEditor(ObjectManipulation* parent,
{
parent->set_focused_editor(nullptr);
#if ENABLE_OBJECT_MANIPULATOR_FOCUS
// if the widget loosing focus is not a manipulator field, call kill_focus
if (dynamic_cast<ManipulationEditor*>(e.GetWindow()) == nullptr)
#else
if (!m_enter_pressed)
#endif // ENABLE_OBJECT_MANIPULATOR_FOCUS
kill_focus(parent);
e.Skip();
}, this->GetId());