mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 18:45:52 +08:00
Do know allow picking while dragging gizmos
This commit is contained in:
parent
570b43941e
commit
63890b5f8d
@ -5420,7 +5420,7 @@ void GLCanvas3D::_refresh_if_shown_on_screen()
|
|||||||
|
|
||||||
void GLCanvas3D::_picking_pass()
|
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();
|
m_hover_volume_idxs.clear();
|
||||||
|
|
||||||
// Render the object for picking.
|
// Render the object for picking.
|
||||||
|
@ -854,7 +854,6 @@ public:
|
|||||||
// Returns the view ray line, in world coordinate, at the given mouse position.
|
// Returns the view ray line, in world coordinate, at the given mouse position.
|
||||||
Linef3 mouse_ray(const Point& mouse_pos);
|
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; }
|
bool is_mouse_dragging() const { return m_mouse.dragging; }
|
||||||
|
|
||||||
double get_size_proportional_to_max_bed_size(double factor) const;
|
double get_size_proportional_to_max_bed_size(double factor) const;
|
||||||
|
@ -310,8 +310,6 @@ bool GLGizmoBase::use_grabbers(const wxMouseEvent &mouse_event) {
|
|||||||
if (!m_grabbers.empty() && m_hover_id < int(m_grabbers.size()))
|
if (!m_grabbers.empty() && m_hover_id < int(m_grabbers.size()))
|
||||||
m_grabbers[m_hover_id].dragging = true;
|
m_grabbers[m_hover_id].dragging = true;
|
||||||
|
|
||||||
// prevent change of hover_id during dragging
|
|
||||||
m_parent.set_mouse_as_dragging();
|
|
||||||
on_start_dragging();
|
on_start_dragging();
|
||||||
|
|
||||||
// Let the plater know that the dragging started
|
// 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
|
// when mouse cursor leave window than finish actual dragging operation
|
||||||
bool is_leaving = mouse_event.Leaving();
|
bool is_leaving = mouse_event.Leaving();
|
||||||
if (mouse_event.Dragging()) {
|
if (mouse_event.Dragging()) {
|
||||||
m_parent.set_mouse_as_dragging();
|
|
||||||
Point mouse_coord(mouse_event.GetX(), mouse_event.GetY());
|
Point mouse_coord(mouse_event.GetX(), mouse_event.GetY());
|
||||||
auto ray = m_parent.mouse_ray(mouse_coord);
|
auto ray = m_parent.mouse_ray(mouse_coord);
|
||||||
UpdateData data(ray, mouse_coord);
|
UpdateData data(ray, mouse_coord);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user