SLA gizmo now uses ctrl to add to selection and alt to remove from selection

This commit is contained in:
Lukas Matena 2019-04-08 15:34:42 +02:00
parent fa890c2bbc
commit f71e14a4d9
5 changed files with 51 additions and 26 deletions

View file

@ -50,7 +50,7 @@ public:
#endif // ENABLE_SVG_ICONS
virtual ~GLGizmoSlaSupports();
void set_sla_support_data(ModelObject* model_object, const Selection& selection);
bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down);
bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down, bool alt_down, bool control_down);
void delete_selected_points(bool force = false);
std::pair<float, float> get_sla_clipping_plane() const;
@ -75,7 +75,12 @@ private:
mutable std::vector<CacheEntry> m_editing_mode_cache; // a support point and whether it is currently selected
float m_clipping_plane_distance = 0.f;
bool m_selection_rectangle_active = false;
enum SelectionRectangleStatus {
srOff = 0,
srSelect = 1,
srDeselect = 2
}m_selection_rectangle_status = srOff;
Vec2d m_selection_rectangle_start_corner;
Vec2d m_selection_rectangle_end_corner;
bool m_wait_for_up_event = false;