FIX: vector capacity reset(STUDIO-2239)
Change-Id: Ie40e8c6d3a42b6a40f4f73d6906acdc6e26d0b41
This commit is contained in:
parent
9c402384ac
commit
62af2b9608
3 changed files with 11 additions and 0 deletions
|
@ -59,9 +59,13 @@ namespace Slic3r {
|
|||
time = 0.0f;
|
||||
prepare_time = 0.0f;
|
||||
custom_gcode_times.clear();
|
||||
custom_gcode_times.shrink_to_fit();
|
||||
moves_times.clear();
|
||||
moves_times.shrink_to_fit();
|
||||
roles_times.clear();
|
||||
roles_times.shrink_to_fit();
|
||||
layers_times.clear();
|
||||
layers_times.shrink_to_fit();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -81,6 +85,7 @@ namespace Slic3r {
|
|||
m.reset();
|
||||
}
|
||||
volumes_per_color_change.clear();
|
||||
volumes_per_color_change.shrink_to_fit();
|
||||
volumes_per_extruder.clear();
|
||||
flush_per_filament.clear();
|
||||
used_filaments_per_role.clear();
|
||||
|
|
|
@ -176,7 +176,9 @@ void GCodeViewer::InstanceVBuffer::Ranges::reset()
|
|||
void GCodeViewer::InstanceVBuffer::reset()
|
||||
{
|
||||
s_ids.clear();
|
||||
s_ids.shrink_to_fit();
|
||||
buffer.clear();
|
||||
buffer.shrink_to_fit();
|
||||
render_ranges.reset();
|
||||
}
|
||||
|
||||
|
@ -1222,6 +1224,7 @@ void GCodeViewer::reset()
|
|||
|
||||
m_moves_count = 0;
|
||||
m_ssid_to_moveid_map.clear();
|
||||
m_ssid_to_moveid_map.shrink_to_fit();
|
||||
for (TBuffer& buffer : m_buffers) {
|
||||
buffer.reset();
|
||||
}
|
||||
|
|
|
@ -666,8 +666,11 @@ public:
|
|||
void reset() {
|
||||
stop_mapping_file();
|
||||
m_lines_ends.clear();
|
||||
m_lines_ends.shrink_to_fit();
|
||||
m_lines.clear();
|
||||
m_lines.shrink_to_fit();
|
||||
m_filename.clear();
|
||||
m_filename.shrink_to_fit();
|
||||
}
|
||||
|
||||
void toggle_visibility() { m_visible = !m_visible; }
|
||||
|
|
Loading…
Reference in a new issue