From d9be78d4cb1188073c2b3502c573154961ef24f2 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 26 Nov 2020 13:37:08 +0100 Subject: [PATCH] Fixed bug introduced with 4d483f323f732ceccf6e581e160b962aa49d09f5 --- src/slic3r/GUI/DoubleSlider.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index 3fb47418d5..34660927a1 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -629,9 +629,7 @@ wxString Control::get_label(int tick, LabelType label_type/* = ltHeightWithLayer return wxString::Format("%d", static_cast(m_values[value])); else { if (label_type == ltEstimatedTime) { - if (value > m_layers_times.size() - 1) - return wxEmptyString; - return short_and_splitted_time(get_time_dhms(m_layers_times[value])); + return (value < m_layers_times.size()) ? short_and_splitted_time(get_time_dhms(m_layers_times[value])) : ""; } wxString str = m_values.empty() ? wxString::Format("%.*f", 2, m_label_koef * value) :