From 2486bdfbcee2285c22a04ca28f3bb63aca0595be Mon Sep 17 00:00:00 2001 From: SoftFever Date: Thu, 8 Jan 2026 20:35:42 +0800 Subject: [PATCH] Remove range checks for bed_exclude_area and never used printable_area checks --- src/slic3r/GUI/Field.cpp | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 55f754e91a..bda1c4d711 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -511,7 +511,6 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true str.Replace(" ", wxEmptyString, true); if (!str.IsEmpty()) { bool invalid_val = false; - bool out_of_range_val = false; wxStringTokenizer thumbnails(str, ","); while (thumbnails.HasMoreTokens()) { wxString token = thumbnails.GetNextToken(); @@ -522,26 +521,8 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true if (x_str.ToDouble(&x) && thumbnail.HasMoreTokens()) { wxString y_str = thumbnail.GetNextToken(); if (y_str.ToDouble(&y) && !thumbnail.HasMoreTokens()) { - if (m_opt_id == "bed_exclude_area") { - if (0 <= x && x <= 350 && 0 <= y && y <= 350) { - out_values.push_back(Vec2d(x, y)); - continue; - } - } - else if (m_opt_id == "printable_area") { - if (0 <= x && x <= 1000 && 0 <= y && y <= 1000) { - out_values.push_back(Vec2d(x, y)); - continue; - } - } - else { - if (0 < x && x < 1000 && 0 < y && y < 1000) { - out_values.push_back(Vec2d(x, y)); - continue; - } - } - out_of_range_val = true; - break; + out_values.push_back(Vec2d(x, y)); + continue; } } } @@ -549,14 +530,7 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true break; } - if (out_of_range_val) { - wxString text_value; - if (!m_value.empty()) - text_value = get_thumbnails_string(boost::any_cast>(m_value)); - set_value(text_value, true); - show_error(m_parent, _L("Value is out of range.")); - } - else if (invalid_val) { + if (invalid_val) { wxString text_value; if (!m_value.empty()) text_value = get_thumbnails_string(boost::any_cast>(m_value));