ENH: only allow setting height when cut plane is horizontal
Jira: STUDIO-1819 Change-Id: I04d258949cbf98a59f7313d714430f361bb2c4a9 (cherry picked from commit 2ffa8430b819cfffe20f4c7734125a3aabd33202)
This commit is contained in:
parent
2800c97165
commit
18366df5d0
1 changed files with 4 additions and 0 deletions
|
@ -497,6 +497,9 @@ void GLGizmoAdvancedCut::on_render_input_window(float x, float y, float bottom_l
|
|||
double height = m_height;
|
||||
ImGui::PushItemWidth(caption_size);
|
||||
ImGui::AlignTextToFramePadding();
|
||||
// only allow setting height when cut plane is horizontal
|
||||
Vec3d plane_normal = get_plane_normal();
|
||||
m_imgui->disabled_begin(std::abs(plane_normal(0)) > EPSILON || std::abs(plane_normal(1)) > EPSILON);
|
||||
m_imgui->text(_L("Height") + " ");
|
||||
ImGui::SameLine(caption_size + 1 * space_size);
|
||||
ImGui::PushItemWidth(3 * unit_size + 2 * space_size);
|
||||
|
@ -513,6 +516,7 @@ void GLGizmoAdvancedCut::on_render_input_window(float x, float y, float bottom_l
|
|||
m_buffered_height = height;
|
||||
}
|
||||
ImGui::PopStyleVar(1);
|
||||
m_imgui->disabled_end();
|
||||
ImGui::Separator();
|
||||
// Part selection
|
||||
m_imgui->bbl_checkbox(_L("Keep upper part"), m_keep_upper);
|
||||
|
|
Loading…
Reference in a new issue