Skip to content

Commit 21ff04e

Browse files
committed
Remove focus from element after update
1 parent 14915a4 commit 21ff04e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Editor/GUIEditorApp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ namespace RTEGUI {
155155
}
156156
m_GridSize = validEntry ? std::clamp(std::stoi(newValue), 0, 255) : m_GridSize;
157157
dynamic_cast<GUITextBox *>(editorEvent.GetControl())->SetText(std::to_string(m_GridSize));
158+
159+
m_EditorBase->SetFocus();
158160
}
159161

160162
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -165,6 +167,7 @@ namespace RTEGUI {
165167
GUIControl *control = m_SelectionInfo.Control;
166168
if (control) { control->ApplyProperties(m_PropertyPage->GetPropertyValues()); }
167169
m_UnsavedChanges = true;
170+
m_EditorBase->SetFocus();
168171
}
169172
if (editorEvent.GetMsg() == GUIPropertyPage::Changed) {
170173
// The properties are dirty and need to be updated
@@ -208,6 +211,7 @@ namespace RTEGUI {
208211

209212
m_ControlsInActiveCollectionBoxList->ClearList();
210213
}
214+
m_EditorBase->SetFocus();
211215
}
212216

213217
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)