ENH: change alt behavior for part selection
1. Alt is no long for object/part delection 2. Alt is defined to select part in View3D Signed-off-by: yifan.wu <yifan.wu@bambulab.com> Change-Id: If0f14f79a321be2d0320a841e15dc973715364ea (cherry picked from commit 9c092f2d20b89470202df037180425b2ecb8ef82)
This commit is contained in:
parent
7a5bca3c30
commit
d14e5c9d59
3 changed files with 9 additions and 2 deletions
|
@ -3180,7 +3180,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
return;
|
||||
}
|
||||
|
||||
if (evt.LeftDown() && (evt.ShiftDown() || evt.AltDown()) && m_picking_enabled) {
|
||||
// BBS: define Alt key to enable volume selection mode
|
||||
m_selection.set_volume_selection_mode(evt.AltDown() ? Selection::Volume : Selection::Instance);
|
||||
if (evt.LeftDown() && evt.ShiftDown() && m_picking_enabled) {
|
||||
if (m_gizmos.get_current_type() != GLGizmosManager::SlaSupports
|
||||
&& m_gizmos.get_current_type() != GLGizmosManager::FdmSupports
|
||||
&& m_gizmos.get_current_type() != GLGizmosManager::Seam
|
||||
|
|
|
@ -766,6 +766,7 @@ bool AssembleView::init(wxWindow* parent, Bed3D& bed, Model* model, DynamicPrint
|
|||
|
||||
// BBS: set volume_selection_mode to Volume
|
||||
m_canvas->get_selection().set_volume_selection_mode(Selection::Volume);
|
||||
m_canvas->get_selection().lock_volume_selection_mode();
|
||||
|
||||
wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(m_canvas_widget, 1, wxALL | wxEXPAND, 0);
|
||||
|
|
|
@ -226,6 +226,7 @@ private:
|
|||
|
||||
// BBS
|
||||
EMode m_volume_selection_mode{ Instance };
|
||||
bool m_volume_selection_locked { false };
|
||||
|
||||
public:
|
||||
Selection();
|
||||
|
@ -343,7 +344,10 @@ public:
|
|||
void translate(unsigned int object_idx, unsigned int instance_idx, const Vec3d& displacement);
|
||||
//BBS: add partplate related logic
|
||||
void notify_instance_update(int object_idx, int instance_idx);
|
||||
void set_volume_selection_mode(EMode mode) { m_volume_selection_mode = mode; }
|
||||
// BBS
|
||||
void set_volume_selection_mode(EMode mode) { if (!m_volume_selection_locked) m_volume_selection_mode = mode; }
|
||||
void lock_volume_selection_mode() { m_volume_selection_locked = true; }
|
||||
void unlock_volume_selection_mode() { m_volume_selection_locked = false; }
|
||||
|
||||
void erase();
|
||||
|
||||
|
|
Loading…
Reference in a new issue