mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
InputText: Fixed an edge case crash that would happen if another widget sharing the same ID is being swapped with an InputText that has yet to be activated.
This commit is contained in:
@ -3278,6 +3278,10 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
clear_active_id = true;
|
||||
}
|
||||
|
||||
// We have an edge case if ActiveId was set through another widget (e.g. widget being swapped)
|
||||
if (g.ActiveId == id && state == NULL)
|
||||
ClearActiveID();
|
||||
|
||||
bool value_changed = false;
|
||||
bool enter_pressed = false;
|
||||
int backup_current_text_length = 0;
|
||||
|
Reference in New Issue
Block a user