Do know allow picking while dragging gizmos

This commit is contained in:
enricoturri1966 2022-06-20 13:58:06 +02:00
parent 570b43941e
commit 63890b5f8d
3 changed files with 1 additions and 5 deletions

View file

@ -5420,7 +5420,7 @@ void GLCanvas3D::_refresh_if_shown_on_screen()
void GLCanvas3D::_picking_pass()
{
if (m_picking_enabled && !m_mouse.dragging && m_mouse.position != Vec2d(DBL_MAX, DBL_MAX)) {
if (m_picking_enabled && !m_mouse.dragging && m_mouse.position != Vec2d(DBL_MAX, DBL_MAX) && !m_gizmos.is_dragging()) {
m_hover_volume_idxs.clear();
// Render the object for picking.

View file

@ -854,7 +854,6 @@ public:
// Returns the view ray line, in world coordinate, at the given mouse position.
Linef3 mouse_ray(const Point& mouse_pos);
void set_mouse_as_dragging() { m_mouse.dragging = true; }
bool is_mouse_dragging() const { return m_mouse.dragging; }
double get_size_proportional_to_max_bed_size(double factor) const;

View file

@ -310,8 +310,6 @@ bool GLGizmoBase::use_grabbers(const wxMouseEvent &mouse_event) {
if (!m_grabbers.empty() && m_hover_id < int(m_grabbers.size()))
m_grabbers[m_hover_id].dragging = true;
// prevent change of hover_id during dragging
m_parent.set_mouse_as_dragging();
on_start_dragging();
// Let the plater know that the dragging started
@ -323,7 +321,6 @@ bool GLGizmoBase::use_grabbers(const wxMouseEvent &mouse_event) {
// when mouse cursor leave window than finish actual dragging operation
bool is_leaving = mouse_event.Leaving();
if (mouse_event.Dragging()) {
m_parent.set_mouse_as_dragging();
Point mouse_coord(mouse_event.GetX(), mouse_event.GetY());
auto ray = m_parent.mouse_ray(mouse_coord);
UpdateData data(ray, mouse_coord);