FIX:select all should ban in paint,cut and so on gizmo

jira: STUDIO-7872
Change-Id: Ic6496dbdd892814e1fc41625ee34ffc46f171657
This commit is contained in:
zhou.xu 2024-08-19 09:10:40 +08:00 committed by Lane.Wei
parent 9267bd65aa
commit 95e8ca7285
4 changed files with 24 additions and 0 deletions

View File

@ -2158,6 +2158,9 @@ void GLCanvas3D::update_plate_thumbnails()
void GLCanvas3D::select_all()
{
if (!m_gizmos.is_allow_select_all()) {
return;
}
m_selection.add_all();
m_dirty = true;
}

View File

@ -4827,6 +4827,9 @@ void ObjectList::select_all()
void ObjectList::select_item_all_children()
{
if (wxGetApp().plater() && !wxGetApp().plater()->canvas3D()->get_gizmos_manager().is_allow_select_all()) {
return;
}
wxDataViewItemArray sels;
// There is no selection before OR some object is selected => select all objects

View File

@ -763,6 +763,22 @@ bool GLGizmosManager::gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_p
return false;
}
bool GLGizmosManager::is_paint_gizmo()
{
return m_current == EType::FdmSupports ||
m_current == EType::MmuSegmentation ||
m_current == EType::Seam;
}
bool GLGizmosManager::is_allow_select_all() {
if (m_current == Undefined || m_current == EType::Move||
m_current == EType::Rotate ||
m_current == EType::Scale) {
return true;
}
return false;
}
ClippingPlane GLGizmosManager::get_clipping_plane() const
{
if (! m_common_gizmos_data

View File

@ -291,6 +291,8 @@ public:
void check_object_located_outside_plate();
bool get_object_located_outside_plate() { return m_object_located_outside_plate; }
bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position = Vec2d::Zero(), bool shift_down = false, bool alt_down = false, bool control_down = false);
bool is_paint_gizmo();
bool is_allow_select_all();
ClippingPlane get_clipping_plane() const;
ClippingPlane get_assemble_view_clipping_plane() const;
bool wants_reslice_supports_on_undo() const;