Added method GLCanvas3D::is_dragging()
This commit is contained in:
parent
da0b9b9b75
commit
b94f19eaf4
@ -3316,6 +3316,7 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas)
|
||||
, m_dynamic_background_enabled(false)
|
||||
, m_multisample_allowed(false)
|
||||
, m_regenerate_volumes(true)
|
||||
, m_moving(false)
|
||||
, m_color_by("volume")
|
||||
, m_reload_delayed(false)
|
||||
, m_external_gizmo_widgets_parent(nullptr)
|
||||
@ -4631,6 +4632,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
#else
|
||||
m_mouse.drag.start_position_3D = pos3d;
|
||||
#endif // ENABLE_GIZMOS_ON_TOP
|
||||
m_moving = true;
|
||||
}
|
||||
}
|
||||
else if (evt.RightDown())
|
||||
@ -4784,6 +4786,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
// Let the platter know that the dragging finished, so a delayed refresh
|
||||
// of the scene with the background processing data should be performed.
|
||||
post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
|
||||
m_moving = false;
|
||||
}
|
||||
else if (m_gizmos.get_current_type() == Gizmos::SlaSupports && m_hover_volume_id != -1)
|
||||
{
|
||||
|
@ -724,6 +724,7 @@ private:
|
||||
bool m_dynamic_background_enabled;
|
||||
bool m_multisample_allowed;
|
||||
bool m_regenerate_volumes;
|
||||
bool m_moving;
|
||||
|
||||
std::string m_color_by;
|
||||
|
||||
@ -811,7 +812,7 @@ public:
|
||||
|
||||
Rect get_gizmo_reset_rect(const GLCanvas3D& canvas, bool viewport) const;
|
||||
bool gizmo_reset_rect_contains(const GLCanvas3D& canvas, float x, float y) const;
|
||||
bool is_gizmo_dragging() const { return m_gizmos.is_dragging(); }
|
||||
bool is_dragging() const { return m_gizmos.is_dragging() || m_moving; }
|
||||
|
||||
void render();
|
||||
|
||||
|
@ -1989,7 +1989,7 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
|
||||
this->preview->reload_print();
|
||||
break;
|
||||
case ptSLA:
|
||||
if (this->canvas3D->is_gizmo_dragging())
|
||||
if (this->canvas3D->is_dragging())
|
||||
delayed_scene_refresh = true;
|
||||
else
|
||||
this->update_sla_scene();
|
||||
@ -2010,7 +2010,7 @@ void Plater::priv::on_slicing_completed(wxCommandEvent &)
|
||||
// this->canvas3D->reload_scene(true);
|
||||
break;
|
||||
case ptSLA:
|
||||
if (this->canvas3D->is_gizmo_dragging())
|
||||
if (this->canvas3D->is_dragging())
|
||||
delayed_scene_refresh = true;
|
||||
else
|
||||
this->update_sla_scene();
|
||||
@ -2052,7 +2052,7 @@ void Plater::priv::on_process_completed(wxCommandEvent &evt)
|
||||
this->preview->reload_print();
|
||||
break;
|
||||
case ptSLA:
|
||||
if (this->canvas3D->is_gizmo_dragging())
|
||||
if (this->canvas3D->is_dragging())
|
||||
delayed_scene_refresh = true;
|
||||
else
|
||||
this->update_sla_scene();
|
||||
|
Loading…
Reference in New Issue
Block a user