Follow-up of 5b5fdfba01 - Removed member variable Selection::m_dragging

It was used only in ObjectManipulation::update_if_dirty() to avoid the update the sidebar reset and mirror button, which results in a slow down of the GUI, while dragging objects/gizmos in the 3D scene

A call to GLCanvas3D::is_dragging() is used instead
This commit is contained in:
enricoturri1966 2022-02-25 11:42:42 +01:00
parent 5b5fdfba01
commit 1e9951dec5
5 changed files with 13 additions and 29 deletions

View file

@ -162,8 +162,7 @@ bool GLGizmoBase::use_grabbers(const wxMouseEvent &mouse_event) {
Selection &selection = m_parent.get_selection();
if (!selection.is_empty() && m_hover_id != -1 &&
(m_grabbers.empty() || m_hover_id < static_cast<int>(m_grabbers.size()))) {
// TODO: investigate if it is neccessary -> there was no stop dragging
selection.start_dragging();
selection.setup_cache();
m_dragging = true;
for (auto &grabber : m_grabbers) grabber.dragging = false;
@ -203,8 +202,6 @@ bool GLGizmoBase::use_grabbers(const wxMouseEvent &mouse_event) {
on_stop_dragging();
m_parent.get_selection().stop_dragging();
// There is prediction that after draggign, data are changed
// Data are updated twice also by canvas3D::reload_scene.
// Should be fixed.