mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 18:35:56 +08:00
fix notification manager error when only one line : supermerill/SuperSlicer#1128
This commit is contained in:
parent
6d2deda47a
commit
bf520b8bdb
@ -515,7 +515,9 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
|
||||
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
|
||||
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
||||
// line2
|
||||
std::string line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
|
||||
std::string line = "";
|
||||
if (m_text1.size() > m_endlines[0])
|
||||
std::string line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
|
||||
cursor_y = win_size.y / 2 + win_size.y / 6 - m_line_height / 2;
|
||||
ImGui::SetCursorPosX(x_offset);
|
||||
ImGui::SetCursorPosY(cursor_y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user