FIX:modify "allow_roatation" condition

jira: STUDIO-8299
Change-Id: I46b4b432554a22d9da383e1650bf2074d7f39756
This commit is contained in:
zhou.xu 2024-09-27 16:18:12 +08:00 committed by Lane.Wei
parent 71e6705ce9
commit dfc34dec31
1 changed files with 7 additions and 4 deletions

View File

@ -1838,10 +1838,13 @@ void GLGizmoSVG::draw_distance()
void GLGizmoSVG::draw_rotation()
{
const EmbossProjection &projection = m_volume->emboss_shape->projection;
bool use_surface = projection.use_surface;
bool allowe_surface_distance = !use_surface && !m_volume->is_the_only_one_part();
m_imgui->disabled_begin(!allowe_surface_distance);
bool allow_rotation = true;
if (!m_volume->is_the_only_one_part()) {
const EmbossProjection &projection = m_volume->emboss_shape->projection;
bool use_surface = projection.use_surface;
allow_rotation = !use_surface;
}
m_imgui->disabled_begin(!allow_rotation);
ImGui::AlignTextToFramePadding();
ImGuiWrapper::text(m_gui_cfg->translations.rotation);
ImGui::SameLine(m_gui_cfg->input_offset);