FIX: custom gcode window cannot paste/ navigate

jira: STUDIO-5208、STUDIO-5070

Change-Id: I4ecb9d06cf5db0ae53a4678181aae9298bac106b
This commit is contained in:
liz.li 2023-11-06 19:58:50 +08:00 committed by Lane.Wei
parent ac84186368
commit 8b70ae4a65
1 changed files with 1 additions and 3 deletions

View File

@ -1114,9 +1114,7 @@ void IMSlider::render_input_custom_gcode(std::string custom_gcode)
}
const int text_height = 6;
ImGui::InputTextMultiline("##text", m_custom_gcode, sizeof(m_custom_gcode), ImVec2(-1, ImGui::GetTextLineHeight() * text_height), ImGuiInputTextFlags_CallbackAlways, [](ImGuiInputTextCallbackData* data) {
return data->CursorPos = data->BufTextLen;
});
ImGui::InputTextMultiline("##text", m_custom_gcode, sizeof(m_custom_gcode), ImVec2(-1, ImGui::GetTextLineHeight() * text_height));
ImGui::NewLine();
ImGui::SameLine(ImGui::GetStyle().WindowPadding.x * 14);