Added visual hints in 3D scene for layers editing

This commit is contained in:
Enrico Turri 2019-06-27 13:42:50 +02:00
parent 1525a864c5
commit 1058721dba
4 changed files with 126 additions and 46 deletions

View file

@ -3307,7 +3307,8 @@ void GLCanvas3D::handle_sidebar_focus_event(const std::string& opt_key, bool foc
void GLCanvas3D::handle_layers_data_focus_event(const t_layer_height_range range, const EditorType type)
{
printf("min_z = %.2f, max_z = %.2f, type=%d\n", range.first, range.second, type);
std::string field = "layer_" + std::to_string(type) + "_" + std::to_string(range.first) + "_" + std::to_string(range.second);
handle_sidebar_focus_event(field, true);
}
void GLCanvas3D::update_ui_from_settings()
@ -4275,13 +4276,7 @@ void GLCanvas3D::_render_sla_slices() const
void GLCanvas3D::_render_selection_sidebar_hints() const
{
if (m_use_VBOs)
m_shader.start_using();
m_selection.render_sidebar_hints(m_sidebar_field);
if (m_use_VBOs)
m_shader.stop_using();
m_selection.render_sidebar_hints(m_sidebar_field, m_shader);
}