Removed cog icon from the horizontal slider.

+ Shortcut "Shift+G" works from the Preview canvas now (not just from the focused slider as before)
This commit is contained in:
YuSanka 2020-11-04 16:26:25 +01:00 committed by Oleksandra Yushchenko
parent ece27dcc42
commit ea5fdcd7b1
6 changed files with 33 additions and 0 deletions

View file

@ -294,6 +294,8 @@ wxSize Control::get_size() const
void Control::get_size(int* w, int* h) const
{
GetSize(w, h);
if (m_draw_mode == dmSequentialGCodeView)
return; // we have no more icons for drawing
is_horizontal() ? *w -= m_lock_icon_dim : *h -= m_lock_icon_dim;
}
@ -909,6 +911,10 @@ void Control::draw_revert_icon(wxDC& dc)
void Control::draw_cog_icon(wxDC& dc)
{
#if ENABLE_GCODE_VIEWER
if (m_draw_mode == dmSequentialGCodeView)
return;
#endif // ENABLE_GCODE_VIEWER
int width, height;
get_size(&width, &height);