mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-24 14:30:54 -05:00
Validate excluded bed area (#17209)
This commit is contained in:
1 parent
bac7112046
commit
c01ac8ff44
5 files changed
+80
-4
No files matched your search
@@ -799,6 +799,15 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
}
|
||||
}
|
||||
|
||||
if (m_opt_id == "bed_exclude_area" && out_values.size() > 1 && !is_valid_bed_exclude_area(out_values)) {
|
||||
wxString text_value;
|
||||
if (const auto *previous_values = boost::any_cast<std::vector<Vec2d>>(&m_value); previous_values != nullptr)
|
||||
text_value = from_u8(ConfigOptionPoints(*previous_values).serialize());
|
||||
set_value(text_value, true);
|
||||
show_error(m_parent, _L("The excluded bed area is invalid. It must be a simple, non-self-intersecting polygon."));
|
||||
break;
|
||||
}
|
||||
|
||||
m_value = out_values;
|
||||
break; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user