FIX:return bar pos only been modified in 3d view

jira: none
Change-Id: I353b2245f8032707c593985eff20bbecc6905525
(cherry picked from commit 01bbdc0b303ab3832e88c580159e73aedd80b929)
This commit is contained in:
zhou.xu 2024-05-14 12:32:34 +08:00 committed by Lane.Wei
parent b28ac4f812
commit 795ec50eb4
1 changed files with 9 additions and 7 deletions

View File

@ -7991,6 +7991,7 @@ void GLCanvas3D::_render_return_toolbar()
float window_pos_x = 30.0f;
float window_pos_y = 14.0f;
{//solve ui overlap issue
if (m_canvas_type == ECanvasType::CanvasView3D) {
float zoom = (float) wxGetApp().plater()->get_camera().get_zoom();
float left_pos = m_main_toolbar.get_item("add")->render_left_pos;
const float toolbar_x = 0.5 * canvas_w + left_pos * zoom;
@ -8000,6 +8001,7 @@ void GLCanvas3D::_render_return_toolbar()
window_pos_y = m_main_toolbar.get_height() + 2.0f;
}
}
}
imgui.set_next_window_pos(window_pos_x, window_pos_y, ImGuiCond_Always, 0, 0);
#ifdef __WINDOWS__
imgui.set_next_window_size(window_width, window_height, ImGuiCond_Always);