"Sequential slider applied only to top layer" parameter from the Preferences is applied just for the horizontal slider now

This commit is contained in:
YuSanka 2020-11-03 15:44:59 +01:00
parent b84efca01e
commit 4d7b5d4451
2 changed files with 8 additions and 5 deletions

View File

@ -53,11 +53,6 @@ static std::string gcode(Type type)
}
}
static bool is_lower_thumb_editable()
{
return Slic3r::GUI::get_app_config()->get("seq_top_layer_only") == "0";
}
Control::Control( wxWindow *parent,
wxWindowID id,
int lowerValue,
@ -960,6 +955,13 @@ int Control::get_value_from_position(const wxCoord x, const wxCoord y)
return int(m_min_value + double(height - SLIDER_MARGIN - y) / step + 0.5);
}
bool Control::is_lower_thumb_editable()
{
if (m_draw_mode == dmSequentialGCodeView)
return Slic3r::GUI::get_app_config()->get("seq_top_layer_only") == "0";
return true;
}
bool Control::detect_selected_slider(const wxPoint& pt)
{
if (is_point_in_rect(pt, m_rect_lower_thumb))

View File

@ -293,6 +293,7 @@ protected:
void draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const;
void update_thumb_rect(const wxCoord begin_x, const wxCoord begin_y, const SelectedSlider& selection);
bool is_lower_thumb_editable();
bool detect_selected_slider(const wxPoint& pt);
void correct_lower_value();
void correct_higher_value();