Cut fixes:
- When cutting a scaled part, do not apply the transformation twice - Right click does not trigger part selection when any modifier is used - When 'flip plane' is clicked, extra render is forced - The choice to keep object A/B is enabled even when part selection is active - 'Cut into' radio buttons are disabled when part selection is active - Added a missing update of connector state - Amended tooltip
This commit is contained in:
parent
2aa55ef950
commit
e4c01a5857
2 changed files with 9 additions and 4 deletions
|
@ -1595,6 +1595,8 @@ void ModelObject::reset_instance_transformation(ModelObject* object, size_t src_
|
|||
for (size_t i = 0; i < object->instances.size(); ++i) {
|
||||
auto& obj_instance = object->instances[i];
|
||||
const double rot_z = obj_instance->get_rotation().z();
|
||||
|
||||
obj_instance->set_transformation(Transformation(obj_instance->get_transformation().get_matrix_no_scaling_factor()));
|
||||
|
||||
Vec3d rotation = Vec3d::Zero();
|
||||
if (!flip && !place_on_cut) {
|
||||
|
|
|
@ -250,7 +250,8 @@ std::string GLGizmoCut3D::get_tooltip() const
|
|||
|
||||
if (!m_dragging && m_hover_id == CutPlane)
|
||||
return _u8L("Click to flip the cut plane\n"
|
||||
"Drag to move the cut plane");
|
||||
"Drag to move the cut plane\n"
|
||||
"Right-click a part to assign it to the other side");
|
||||
|
||||
if (tooltip.empty() && (m_hover_id == X || m_hover_id == Y)) {
|
||||
std::string axis = m_hover_id == X ? "X" : "Y";
|
||||
|
@ -351,7 +352,7 @@ bool GLGizmoCut3D::on_mouse(const wxMouseEvent &mouse_event)
|
|||
return true;
|
||||
}
|
||||
else if (mouse_event.RightDown()) {
|
||||
if (! m_connectors_editing) {
|
||||
if (! m_connectors_editing && mouse_event.GetModifiers() == wxMOD_NONE) {
|
||||
// Check the internal part raycasters.
|
||||
if (! m_part_selection.valid())
|
||||
process_contours();
|
||||
|
@ -1868,6 +1869,7 @@ void GLGizmoCut3D::reset_cut_plane()
|
|||
m_ar_plane_center = m_plane_center;
|
||||
|
||||
reset_cut_by_contours();
|
||||
m_parent.request_extra_frame();
|
||||
}
|
||||
|
||||
void GLGizmoCut3D::invalidate_cut_plane()
|
||||
|
@ -2074,7 +2076,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
|
|||
ImGuiWrapper::text(_L("Cut result") + ": ");
|
||||
add_vertical_scaled_interval(0.5f);
|
||||
|
||||
m_imgui->disabled_begin(has_connectors || m_keep_as_parts || m_part_selection.valid());
|
||||
m_imgui->disabled_begin(has_connectors || m_keep_as_parts);
|
||||
render_part_name("A", m_keep_upper, m_imgui->to_ImU32(UPPER_PART_COLOR));
|
||||
ImGui::SameLine(h_shift + ImGui::GetCurrentWindow()->WindowPadding.x);
|
||||
render_part_name("B", m_keep_lower, m_imgui->to_ImU32(LOWER_PART_COLOR));
|
||||
|
@ -2090,7 +2092,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
|
|||
|
||||
add_vertical_scaled_interval(0.75f);
|
||||
|
||||
m_imgui->disabled_begin(has_connectors);
|
||||
m_imgui->disabled_begin(has_connectors || m_part_selection.valid());
|
||||
ImGuiWrapper::text(_L("Cut into") + ":");
|
||||
|
||||
if (m_part_selection.valid())
|
||||
|
@ -2693,6 +2695,7 @@ void GLGizmoCut3D::reset_connectors()
|
|||
m_c->selection_info()->model_object()->cut_connectors.clear();
|
||||
update_raycasters_for_picking();
|
||||
clear_selection();
|
||||
check_and_update_connectors_state();
|
||||
}
|
||||
|
||||
void GLGizmoCut3D::init_connector_shapes()
|
||||
|
|
Loading…
Reference in a new issue