ENH: privide setting option of exclude_area

As title. User can delete the value to enable 256x256 printable
size

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ia10454b7a7a1b28c04d8d41df9f3251875f6e74e
This commit is contained in:
salt.wei 2022-07-25 18:32:05 +08:00 committed by Lane.Wei
parent f9dce93a52
commit 5a2669dcc2
7 changed files with 30 additions and 11 deletions

View file

@ -374,9 +374,17 @@ 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 (0 < x && x < 1000 && 0 < y && y < 1000) {
out_values.push_back(Vec2d(x, y));
continue;
if (m_opt_id == "bed_exclude_area") {
if (0 <= x && x <= 256 && 0 <= y && y <= 256) {
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;