mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-11 10:23:06 -07:00
FIX: position of LayersEditing dialog
jira: STUDIO-10706 Change-Id: Ibadeef751ad500f61b9ab20cb7f030c461869399 (cherry picked from commit 38da475197b5059225f732d11963f10f1d58ad6b)
This commit is contained in:
parent
51efa961d4
commit
256eca69ab
1 changed files with 13 additions and 1 deletions
|
|
@ -254,7 +254,19 @@ void GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(const GLCanv
|
|||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
const Size& cnv_size = canvas.get_canvas_size();
|
||||
float left_pos = canvas.m_main_toolbar.get_item("layersediting")->render_left_pos;
|
||||
const float x = (1 + left_pos) * cnv_size.get_width() / 2;
|
||||
float x = (1 + left_pos) * cnv_size.get_width() / 2;
|
||||
|
||||
const auto canvas_width = cnv_size.get_width();
|
||||
if (abs(GLCanvas3D::LayersEditing::s_overlay_window_width) > 0.01f) {
|
||||
if (x + GLCanvas3D::LayersEditing::s_overlay_window_width > canvas_width) {
|
||||
if (GLCanvas3D::LayersEditing::s_overlay_window_width > canvas_width)
|
||||
x = 0;
|
||||
else
|
||||
x = canvas_width - GLCanvas3D::LayersEditing::s_overlay_window_width;
|
||||
}
|
||||
}
|
||||
x = std::max(x, 0.0f);
|
||||
|
||||
imgui.set_next_window_pos(x, canvas.m_main_toolbar.get_height(), ImGuiCond_Always, 0.0f, 0.0f);
|
||||
|
||||
imgui.push_toolbar_style(canvas.get_scale());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue