GCodeViewer -> Shortcut to show/hide legend

This commit is contained in:
enricoturri1966 2020-04-27 08:19:48 +02:00
parent 4ea96340d8
commit c76bf934f7
2 changed files with 11 additions and 1 deletions

View File

@ -10,7 +10,6 @@
#if ENABLE_GCODE_VIEWER #if ENABLE_GCODE_VIEWER
#include "GUI_Utils.hpp" #include "GUI_Utils.hpp"
#include "DoubleSlider.hpp" #include "DoubleSlider.hpp"
#include "GLToolbar.hpp"
#include "GLCanvas3D.hpp" #include "GLCanvas3D.hpp"
#include "libslic3r/Model.hpp" #include "libslic3r/Model.hpp"
#endif // ENABLE_GCODE_VIEWER #endif // ENABLE_GCODE_VIEWER

View File

@ -3202,6 +3202,17 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
#else #else
case 'k': { m_camera.select_next_type(); m_dirty = true; break; } case 'k': { m_camera.select_next_type(); m_dirty = true; break; }
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER #endif // ENABLE_NON_STATIC_CANVAS_MANAGER
#if ENABLE_GCODE_VIEWER
case 'L':
case 'l': {
if (!m_main_toolbar.is_enabled())
{
m_gcode_viewer.enable_legend(!m_gcode_viewer.is_legend_enabled());
m_dirty = true;
}
break;
}
#endif // ENABLE_GCODE_VIEWER
case 'O': case 'O':
case 'o': { _update_camera_zoom(-1.0); break; } case 'o': { _update_camera_zoom(-1.0); break; }
#if ENABLE_RENDER_PICKING_PASS #if ENABLE_RENDER_PICKING_PASS