Merge remote-tracking branch 'PRIVATE/master' into ys_emboss_with_master
This commit is contained in:
commit
fbcdd4191b
65 changed files with 6783 additions and 2921 deletions
|
@ -1367,6 +1367,8 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
|
|||
&& (instance_idx == -1 || vol->composite_id.instance_id == instance_idx)
|
||||
&& (mv == nullptr || m_model->objects[vol->composite_id.object_id]->volumes[vol->composite_id.volume_id] == mv)) {
|
||||
vol->is_active = visible;
|
||||
if (!vol->is_modifier)
|
||||
vol->color.a(1.f);
|
||||
|
||||
if (instance_idx == -1) {
|
||||
vol->force_native_color = false;
|
||||
|
@ -1375,9 +1377,13 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
|
|||
const GLGizmosManager& gm = get_gizmos_manager();
|
||||
auto gizmo_type = gm.get_current_type();
|
||||
if ( (gizmo_type == GLGizmosManager::FdmSupports
|
||||
|| gizmo_type == GLGizmosManager::Seam)
|
||||
&& ! vol->is_modifier)
|
||||
|| gizmo_type == GLGizmosManager::Seam
|
||||
|| gizmo_type == GLGizmosManager::Cut)
|
||||
&& ! vol->is_modifier) {
|
||||
vol->force_neutral_color = true;
|
||||
if (gizmo_type == GLGizmosManager::Cut)
|
||||
vol->color.a(0.95f);
|
||||
}
|
||||
else if (gizmo_type == GLGizmosManager::MmuSegmentation)
|
||||
vol->is_active = false;
|
||||
else
|
||||
|
@ -3371,6 +3377,11 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
show_sinking_contours();
|
||||
}
|
||||
}
|
||||
else if (evt.LeftUp() &&
|
||||
m_gizmos.get_current_type() == GLGizmosManager::EType::Scale &&
|
||||
m_gizmos.get_current()->get_state() == GLGizmoBase::EState::On) {
|
||||
wxGetApp().obj_list()->selection_changed();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -3446,6 +3457,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
if (m_gizmos.get_current_type() != GLGizmosManager::SlaSupports &&
|
||||
m_gizmos.get_current_type() != GLGizmosManager::FdmSupports &&
|
||||
m_gizmos.get_current_type() != GLGizmosManager::Seam &&
|
||||
m_gizmos.get_current_type() != GLGizmosManager::Cut &&
|
||||
m_gizmos.get_current_type() != GLGizmosManager::MmuSegmentation) {
|
||||
m_rectangle_selection.start_dragging(m_mouse.position, evt.ShiftDown() ? GLSelectionRectangle::EState::Select : GLSelectionRectangle::EState::Deselect);
|
||||
m_dirty = true;
|
||||
|
@ -3495,7 +3507,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
const int volume_idx = get_first_hover_volume_idx();
|
||||
BoundingBoxf3 volume_bbox = m_volumes.volumes[volume_idx]->transformed_bounding_box();
|
||||
volume_bbox.offset(1.0);
|
||||
if ((!any_gizmo_active || !evt.CmdDown()) && volume_bbox.contains(m_mouse.scene_position)) {
|
||||
const bool is_cut_connector_selected = m_selection.is_any_connector();
|
||||
if ((!any_gizmo_active || !evt.CmdDown()) && volume_bbox.contains(m_mouse.scene_position) && !is_cut_connector_selected) {
|
||||
m_volumes.volumes[volume_idx]->hover = GLVolume::HS_None;
|
||||
// The dragging operation is initiated.
|
||||
m_mouse.drag.move_volume_idx = volume_idx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue