mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-06 05:57:57 +08:00
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:
parent
b28ac4f812
commit
795ec50eb4
@ -7991,13 +7991,15 @@ void GLCanvas3D::_render_return_toolbar()
|
|||||||
float window_pos_x = 30.0f;
|
float window_pos_x = 30.0f;
|
||||||
float window_pos_y = 14.0f;
|
float window_pos_y = 14.0f;
|
||||||
{//solve ui overlap issue
|
{//solve ui overlap issue
|
||||||
float zoom = (float) wxGetApp().plater()->get_camera().get_zoom();
|
if (m_canvas_type == ECanvasType::CanvasView3D) {
|
||||||
float left_pos = m_main_toolbar.get_item("add")->render_left_pos;
|
float zoom = (float) wxGetApp().plater()->get_camera().get_zoom();
|
||||||
const float toolbar_x = 0.5 * canvas_w + left_pos * zoom;
|
float left_pos = m_main_toolbar.get_item("add")->render_left_pos;
|
||||||
const float margin = 5;
|
const float toolbar_x = 0.5 * canvas_w + left_pos * zoom;
|
||||||
if (toolbar_x < window_width + margin * 3) {
|
const float margin = 5;
|
||||||
window_pos_x = 5.0f;
|
if (toolbar_x < window_width + margin * 3) {
|
||||||
window_pos_y = m_main_toolbar.get_height() + 2.0f;
|
window_pos_x = 5.0f;
|
||||||
|
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);
|
imgui.set_next_window_pos(window_pos_x, window_pos_y, ImGuiCond_Always, 0, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user