Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_3dconnexion

This commit is contained in:
Enrico Turri 2019-09-27 14:52:30 +02:00
commit 4b3eab0ed9
53 changed files with 1055 additions and 365 deletions

View file

@ -931,8 +931,8 @@ bool GLCanvas3D::LegendTexture::generate(const GCodePreviewData& preview_data, c
if (items_count > 1)
m_original_height += (items_count - 1) * scaled_square_contour;
m_width = (int)next_highest_power_of_2((uint32_t)m_original_width);
m_height = (int)next_highest_power_of_2((uint32_t)m_original_height);
m_width = (int)next_highest_power_of_2((uint32_t)m_original_width);
m_height = (int)next_highest_power_of_2((uint32_t)m_original_height);
// generates bitmap
wxBitmap bitmap(m_width, m_height);
@ -1885,7 +1885,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
if (m_reload_delayed)
return;
bool update_object_list = false;
bool update_object_list = false;
if (m_volumes.volumes != glvolumes_new)
update_object_list = true;
@ -3413,10 +3413,9 @@ void GLCanvas3D::handle_sidebar_focus_event(const std::string& opt_key, bool foc
m_sidebar_field = focus_on ? opt_key : "";
if (!m_sidebar_field.empty())
{
m_gizmos.reset_all_states();
m_dirty = true;
}
m_dirty = true;
}
void GLCanvas3D::handle_layers_data_focus_event(const t_layer_height_range range, const EditorType type)
@ -5096,14 +5095,14 @@ void GLCanvas3D::_load_gcode_extrusion_paths(const GCodePreviewData& preview_dat
for (const GCodePreviewData::Extrusion::Layer &layer : preview_data.extrusion.layers)
for (const ExtrusionPath &path : layer.paths)
++ num_paths_per_role[size_t(path.role())];
std::vector<std::vector<float>> roles_values;
std::vector<std::vector<float>> roles_values;
roles_values.assign(size_t(erCount), std::vector<float>());
for (size_t i = 0; i < roles_values.size(); ++ i)
roles_values[i].reserve(num_paths_per_role[i]);
for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers)
for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers)
for (const ExtrusionPath& path : layer.paths)
roles_values[size_t(path.role())].emplace_back(Helper::path_filter(preview_data.extrusion.view_type, path));
roles_filters.reserve(size_t(erCount));
roles_filters.reserve(size_t(erCount));
size_t num_buffers = 0;
for (std::vector<float> &values : roles_values) {
sort_remove_duplicates(values);