FIX: remove extra filament change

Jira: none

if the fist print filement as same as the filament be set on start gcode
not insert filment change

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I0114f287fff9be276a90772537d1910df18dec61
(cherry picked from commit 276c797faff1407b2c1606d4bfafe21773901001)
This commit is contained in:
qing.zhang
2024-08-28 12:27:09 +08:00
committed by Noisyfox
parent 0ff33f8f7e
commit 5fda94a53b
3 changed files with 13 additions and 0 deletions

View File

@@ -6460,6 +6460,9 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction, LiftType li
std::string GCode::set_extruder(unsigned int new_filament_id, double print_z, bool by_object)
{
//init extrude
m_writer.init_extruder(new_filament_id);
int new_extruder_id = get_extruder_id(new_filament_id);
if (!m_writer.need_toolchange(new_filament_id))
return "";