Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_selection_undoredo
This commit is contained in:
commit
f4209dce0b
@ -1219,7 +1219,6 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar
|
||||
, m_moving_enabled(false)
|
||||
, m_dynamic_background_enabled(false)
|
||||
, m_multisample_allowed(false)
|
||||
, m_regenerate_volumes(true)
|
||||
, m_moving(false)
|
||||
, m_tab_down(false)
|
||||
, m_cursor_type(Standard)
|
||||
@ -1866,12 +1865,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
PrinterTechnology printer_technology = m_process->current_printer_technology();
|
||||
int volume_idx_wipe_tower_old = -1;
|
||||
|
||||
if (printer_technology == ptSLA)
|
||||
// Always do the full refresh in SLA mode to show / hide SLA support structures when an object is moved outside / inside the build volume.
|
||||
m_regenerate_volumes = true;
|
||||
|
||||
if (m_regenerate_volumes)
|
||||
{
|
||||
// Release invalidated volumes to conserve GPU memory in case of delayed refresh (see m_reload_delayed).
|
||||
// First initialize model_volumes_new_sorted & model_instances_new_sorted.
|
||||
for (int object_idx = 0; object_idx < (int)m_model->objects.size(); ++ object_idx) {
|
||||
@ -1962,15 +1955,12 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
}
|
||||
}
|
||||
sort_remove_duplicates(instance_ids_selected);
|
||||
}
|
||||
|
||||
if (m_reload_delayed)
|
||||
return;
|
||||
|
||||
bool update_object_list = false;
|
||||
|
||||
if (m_regenerate_volumes)
|
||||
{
|
||||
if (m_volumes.volumes != glvolumes_new)
|
||||
update_object_list = true;
|
||||
m_volumes.volumes = std::move(glvolumes_new);
|
||||
@ -2104,7 +2094,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
m_selection.instances_changed(instance_ids_selected);
|
||||
else
|
||||
m_selection.volumes_changed(map_glvolume_old_to_new);
|
||||
}
|
||||
|
||||
m_gizmos.update_data();
|
||||
m_gizmos.refresh_on_off_state();
|
||||
@ -2147,9 +2136,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, false));
|
||||
}
|
||||
|
||||
// restore to default value
|
||||
m_regenerate_volumes = true;
|
||||
|
||||
m_camera.set_scene_box(scene_bounding_box());
|
||||
|
||||
if (m_selection.is_empty())
|
||||
@ -2921,7 +2907,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
}
|
||||
}
|
||||
|
||||
m_regenerate_volumes = false;
|
||||
m_selection.translate(cur_pos - m_mouse.drag.start_position_3D);
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
m_dirty = true;
|
||||
@ -2981,7 +2966,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
}
|
||||
else if ((m_mouse.drag.move_volume_idx != -1) && m_mouse.dragging)
|
||||
{
|
||||
m_regenerate_volumes = false;
|
||||
do_move(L("Move Object"));
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
// Let the plater know that the dragging finished, so a delayed refresh
|
||||
|
@ -463,7 +463,6 @@ private:
|
||||
bool m_moving_enabled;
|
||||
bool m_dynamic_background_enabled;
|
||||
bool m_multisample_allowed;
|
||||
bool m_regenerate_volumes;
|
||||
bool m_moving;
|
||||
bool m_tab_down;
|
||||
ECursorType m_cursor_type;
|
||||
@ -652,7 +651,6 @@ public:
|
||||
Linef3 mouse_ray(const Point& mouse_pos);
|
||||
|
||||
void set_mouse_as_dragging() { m_mouse.dragging = true; }
|
||||
void disable_regenerate_volumes() { m_regenerate_volumes = false; }
|
||||
void refresh_camera_scene_box() { m_camera.set_scene_box(scene_bounding_box()); }
|
||||
bool is_mouse_dragging() const { return m_mouse.dragging; }
|
||||
|
||||
|
@ -623,7 +623,6 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||
{
|
||||
case Move:
|
||||
{
|
||||
m_parent.disable_regenerate_volumes();
|
||||
m_parent.do_move(L("Gizmo-Move"));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user