Follow-up of cfe8aa4818 - Fixed focus when moving between object manipulator fields by tab key or mouse click

This commit is contained in:
enricoturri1966 2022-02-02 15:25:35 +01:00
parent 81b9997009
commit 222e3ec6ef

View File

@ -1104,8 +1104,8 @@ ManipulationEditor::ManipulationEditor(ObjectManipulation* parent,
parent->set_focused_editor(nullptr); parent->set_focused_editor(nullptr);
#if ENABLE_OBJECT_MANIPULATOR_FOCUS #if ENABLE_OBJECT_MANIPULATOR_FOCUS
// if the widget loosing focus is not a manipulator field, call kill_focus // if the widgets exchanging focus are both manipulator fields, call kill_focus
if (dynamic_cast<ManipulationEditor*>(e.GetWindow()) == nullptr) if (dynamic_cast<ManipulationEditor*>(e.GetEventObject()) != nullptr && dynamic_cast<ManipulationEditor*>(e.GetWindow()) != nullptr)
#else #else
if (!m_enter_pressed) if (!m_enter_pressed)
#endif // ENABLE_OBJECT_MANIPULATOR_FOCUS #endif // ENABLE_OBJECT_MANIPULATOR_FOCUS