Add another one clear of search string for font name
This commit is contained in:
parent
c49969f7d0
commit
d63c954247
1 changed files with 9 additions and 3 deletions
|
@ -2037,8 +2037,14 @@ void GLGizmoEmboss::draw_font_list()
|
||||||
|
|
||||||
// change color of hint to normal text
|
// change color of hint to normal text
|
||||||
bool is_popup_open = ImGui::IsPopupOpen(popup_id);
|
bool is_popup_open = ImGui::IsPopupOpen(popup_id);
|
||||||
if (!is_popup_open)
|
if (!is_popup_open) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_TextDisabled, ImGui::GetStyleColorVec4(ImGuiCol_Text));
|
ImGui::PushStyleColor(ImGuiCol_TextDisabled, ImGui::GetStyleColorVec4(ImGuiCol_Text));
|
||||||
|
|
||||||
|
// Fix clearance of search input,
|
||||||
|
// Sometime happens that search text not disapear after font select
|
||||||
|
m_face_names.search.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::InputTextWithHint(input_id, selected, &m_face_names.search, input_flags)) {
|
if (ImGui::InputTextWithHint(input_id, selected, &m_face_names.search, input_flags)) {
|
||||||
// update filtration result
|
// update filtration result
|
||||||
m_face_names.hide = std::vector<bool>(m_face_names.faces.size(), {false});
|
m_face_names.hide = std::vector<bool>(m_face_names.faces.size(), {false});
|
||||||
|
@ -2052,7 +2058,7 @@ void GLGizmoEmboss::draw_font_list()
|
||||||
m_face_names.hide[index] = !start_with;
|
m_face_names.hide[index] = !start_with;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!is_popup_open)
|
if (!is_popup_open)
|
||||||
ImGui::PopStyleColor(); // revert changes for hint color
|
ImGui::PopStyleColor(); // revert changes for hint color
|
||||||
|
|
||||||
const bool is_input_text_active = ImGui::IsItemActive();
|
const bool is_input_text_active = ImGui::IsItemActive();
|
||||||
|
@ -2118,7 +2124,6 @@ void GLGizmoEmboss::draw_font_list()
|
||||||
// Just one after close combo box
|
// Just one after close combo box
|
||||||
// free texture and set id to zero
|
// free texture and set id to zero
|
||||||
m_face_names.is_init = false;
|
m_face_names.is_init = false;
|
||||||
m_face_names.search.clear();
|
|
||||||
m_face_names.hide.clear();
|
m_face_names.hide.clear();
|
||||||
// cancel all process for generation of texture
|
// cancel all process for generation of texture
|
||||||
for (FaceName &face : m_face_names.faces)
|
for (FaceName &face : m_face_names.faces)
|
||||||
|
@ -2129,6 +2134,7 @@ void GLGizmoEmboss::draw_font_list()
|
||||||
|
|
||||||
// Remove value from search input
|
// Remove value from search input
|
||||||
ImGuiWrapper::left_inputs();
|
ImGuiWrapper::left_inputs();
|
||||||
|
m_face_names.search.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete unloadable face name when try to use
|
// delete unloadable face name when try to use
|
||||||
|
|
Loading…
Reference in a new issue