From ed40ce590bd2051e277e9e2792dc746caf6d9f56 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Thu, 27 Mar 2025 16:48:51 +0800 Subject: [PATCH] FIX: Remove editing restrictions for unprintable areas jira: STUDIO-8934 Change-Id: Ied5f1571e9e4f8800eb2dc76eede052c7a656c1d (cherry picked from commit 3ed51770b824c68825941a11b18b31f45b22ce62) --- src/slic3r/GUI/Field.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index dce953a576..6198f52c86 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -512,18 +512,18 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true if (!str.IsEmpty()) { bool invalid_val = false; bool out_of_range_val = false; - wxStringTokenizer points(str, ","); - while (points.HasMoreTokens()) { - wxString token = points.GetNextToken(); + wxStringTokenizer thumbnails(str, ","); + while (thumbnails.HasMoreTokens()) { + wxString token = thumbnails.GetNextToken(); double x, y; - wxStringTokenizer _point(token, "x"); - if (_point.HasMoreTokens()) { - wxString x_str = _point.GetNextToken(); - if (x_str.ToDouble(&x) && _point.HasMoreTokens()) { - wxString y_str = _point.GetNextToken(); - if (y_str.ToDouble(&y) && !_point.HasMoreTokens()) { + wxStringTokenizer thumbnail(token, "x"); + if (thumbnail.HasMoreTokens()) { + wxString x_str = thumbnail.GetNextToken(); + 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 && 0 <= y) { + if (0 <= x && x <= 350 && 0 <= y && y <= 350) { out_values.push_back(Vec2d(x, y)); continue; }