SPE-1739: Fixed calculation of gcode preview sequential slider endpoints

(cherry picked from commit 578921257d14e2c07611dfbb89cda5f9dc776e0c)
This commit is contained in:
enricoturri1966
2023-05-30 02:51:01 -04:00
committed by Andrew Sun
parent 25c19c94b5
commit 20f132e09a
3 changed files with 7 additions and 4 deletions

View File

@@ -1288,8 +1288,7 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
// process gcode
m_result.filename = filename;
m_result.id = ++s_result_id;
// 1st move must be a dummy move
m_result.moves.emplace_back(GCodeProcessorResult::MoveVertex());
initialize_result_moves();
size_t parse_line_callback_cntr = 10000;
m_parser.parse_file(filename, [this, cancel_callback, &parse_line_callback_cntr](GCodeReader& reader, const GCodeReader::GCodeLine& line) {
if (-- parse_line_callback_cntr == 0) {
@@ -1312,8 +1311,6 @@ void GCodeProcessor::initialize(const std::string& filename)
// process gcode
m_result.filename = filename;
m_result.id = ++s_result_id;
// 1st move must be a dummy move
m_result.moves.emplace_back(GCodeProcessorResult::MoveVertex());
}
void GCodeProcessor::process_buffer(const std::string &buffer)