FIX:fix text display in measure gizmo
fix right up then exit gizmo Jira: STUDIO-6426 STUDIO-6427 STUDIO-6417 Change-Id: Ifc8ed5d47d0134fe9545db619aec1d0e32c16775
This commit is contained in:
parent
58bba45bc2
commit
97541e2043
|
@ -575,7 +575,11 @@ void GLGizmoMeasure::on_set_state()
|
||||||
|
|
||||||
std::string GLGizmoMeasure::on_get_name() const
|
std::string GLGizmoMeasure::on_get_name() const
|
||||||
{
|
{
|
||||||
return _u8L("Measure");
|
if (!on_is_activable() && m_state == EState::Off) {
|
||||||
|
return _u8L("Measure") + ":\n" + _u8L("Please select at least one object.");
|
||||||
|
} else {
|
||||||
|
return _u8L("Measure");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GLGizmoMeasure::on_is_activable() const
|
bool GLGizmoMeasure::on_is_activable() const
|
||||||
|
@ -1987,6 +1991,7 @@ void GLGizmoMeasure::on_render_input_window(float x, float y, float bottom_limit
|
||||||
ImGui::PushItemWidth(feature_second_text_length);
|
ImGui::PushItemWidth(feature_second_text_length);
|
||||||
m_imgui->text(feature_second_text);
|
m_imgui->text(feature_second_text);
|
||||||
if (m_selected_features.first.feature.has_value() && m_selected_features.second.feature.has_value()) {
|
if (m_selected_features.first.feature.has_value() && m_selected_features.second.feature.has_value()) {
|
||||||
|
m_show_reset_first_tip = false;
|
||||||
ImGui::SameLine(selection_cap_length + feature_second_text_length + space_size * 2);
|
ImGui::SameLine(selection_cap_length + feature_second_text_length + space_size * 2);
|
||||||
ImGui::PushItemWidth(space_size * 2);
|
ImGui::PushItemWidth(space_size * 2);
|
||||||
ImGui::PushID("Reset2");
|
ImGui::PushID("Reset2");
|
||||||
|
|
|
@ -1011,9 +1011,10 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
//wxGetApp().obj_manipul()->set_dirty();
|
//wxGetApp().obj_manipul()->set_dirty();
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
else if (evt.RightUp() && (m_current == FdmSupports || m_current == Seam || m_current == MmuSegmentation || m_current == Cut)
|
else if (evt.RightUp() && (m_current == FdmSupports || m_current == Seam || m_current == MmuSegmentation || m_current == Cut
|
||||||
&& !m_parent.is_mouse_dragging()
|
|| m_current == Measure || m_current == MeshBoolean)
|
||||||
&& gizmo_event(SLAGizmoEventType::RightUp, mouse_pos, evt.ShiftDown(), evt.AltDown(), control_down)) {
|
&& !m_parent.is_mouse_dragging() ) {
|
||||||
|
gizmo_event(SLAGizmoEventType::RightUp, mouse_pos, evt.ShiftDown(), evt.AltDown(), control_down);
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
else if (evt.LeftUp()) {
|
else if (evt.LeftUp()) {
|
||||||
|
|
Loading…
Reference in New Issue