mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_fix_options_z
This commit is contained in:
commit
8701dd0c76
8 changed files with 69 additions and 31 deletions
|
@ -230,18 +230,21 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
|||
}
|
||||
double val;
|
||||
|
||||
bool is_na_value = m_opt.nullable && str == na_value();
|
||||
|
||||
const char dec_sep = is_decimal_separator_point() ? '.' : ',';
|
||||
const char dec_sep_alt = dec_sep == '.' ? ',' : '.';
|
||||
// Replace the first incorrect separator in decimal number.
|
||||
if (str.Replace(dec_sep_alt, dec_sep, false) != 0)
|
||||
// Replace the first incorrect separator in decimal number,
|
||||
// if this value doesn't "N/A" value in some language
|
||||
// see https://github.com/prusa3d/PrusaSlicer/issues/6921
|
||||
if (!is_na_value && str.Replace(dec_sep_alt, dec_sep, false) != 0)
|
||||
set_value(str, false);
|
||||
|
||||
|
||||
if (str == dec_sep)
|
||||
val = 0.0;
|
||||
else
|
||||
{
|
||||
if (m_opt.nullable && str == na_value())
|
||||
if (is_na_value)
|
||||
val = ConfigOptionFloatsNullable::nil_value();
|
||||
else if (!str.ToDouble(&val))
|
||||
{
|
||||
|
|
|
@ -1190,7 +1190,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result)
|
|||
};
|
||||
auto add_indices_as_line = [](const GCodeProcessor::MoveVertex& prev, const GCodeProcessor::MoveVertex& curr, TBuffer& buffer,
|
||||
unsigned int ibuffer_id, IndexBuffer& indices, size_t move_id) {
|
||||
if (prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
if (buffer.paths.empty() || prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
// add starting index
|
||||
indices.push_back(static_cast<IBufferType>(indices.size()));
|
||||
buffer.add_path(curr, ibuffer_id, indices.size() - 1, move_id - 1);
|
||||
|
|
|
@ -4871,10 +4871,9 @@ void Plater::load_gcode(const wxString& filename)
|
|||
|
||||
// process gcode
|
||||
GCodeProcessor processor;
|
||||
processor.enable_producers(true);
|
||||
try
|
||||
{
|
||||
processor.process_file(filename.ToUTF8().data(), false);
|
||||
processor.process_file(filename.ToUTF8().data());
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue