Temporary (for testing) crash fixing on get_label from PrusaDoubleSlider
This commit is contained in:
parent
259aed3bf3
commit
7c673179f6
1 changed files with 2 additions and 0 deletions
|
@ -1384,6 +1384,8 @@ wxString PrusaDoubleSlider::get_label(const SelectedSlider& selection) const
|
|||
|
||||
if (m_label_koef == 1.0 && m_values.empty())
|
||||
return wxString::Format("%d", value);
|
||||
if (value >= m_values.size())
|
||||
return "ErrVal";
|
||||
|
||||
const wxString str = m_values.empty() ?
|
||||
wxNumberFormatter::ToString(m_label_koef*value, 2, wxNumberFormatter::Style_None) :
|
||||
|
|
Loading…
Reference in a new issue