diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index ab8c1f278..5534e75b5 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2641,8 +2641,8 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re x = plate_bbox_x_max_local_coord - wipe_tower_size(0) - margin; need_update = true; } - else if (x < plate_origin(0) + margin) { - x = plate_origin(0) + margin; + else if (x < margin) { + x = margin; need_update = true; } if (need_update) { @@ -2655,8 +2655,8 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re y = plate_bbox_y_max_local_coord - wipe_tower_size(1) - margin; need_update = true; } - else if (y < plate_origin(1) + margin) { - y = plate_origin(1) + margin; + else if (y < margin) { + y = margin; need_update = true; } if (need_update) { diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 7c4fb0933..129f319ec 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -58,6 +58,9 @@ static const int PARTPLATE_TEXT_OFFSET_X1 = 3; static const int PARTPLATE_TEXT_OFFSET_X2 = 1; static const int PARTPLATE_TEXT_OFFSET_Y = 1; static const int PARTPLATE_PLATENAME_OFFSET_Y = 10; + +static const float WIPE_TOWER_DEFAULT_X_POS = 15.; +static const float WIPE_TOWER_DEFAULT_Y_POS = 220.; std::array PlateTextureForeground = {0x0, 0xae, 0x42, 0xff}; namespace Slic3r { @@ -3418,6 +3421,12 @@ int PartPlateList::create_plate(bool adjust_position) ConfigOptionFloats* wipe_tower_y = proj_cfg.opt("wipe_tower_y"); wipe_tower_x->values.resize(m_plate_list.size(), wipe_tower_x->values.front()); wipe_tower_y->values.resize(m_plate_list.size(), wipe_tower_y->values.front()); + + // set the default position, the same with print config(left top) + ConfigOptionFloat wt_x_opt(WIPE_TOWER_DEFAULT_X_POS); + ConfigOptionFloat wt_y_opt(WIPE_TOWER_DEFAULT_Y_POS); + dynamic_cast(proj_cfg.option("wipe_tower_x"))->set_at(&wt_x_opt, new_index, 0); + dynamic_cast(proj_cfg.option("wipe_tower_y"))->set_at(&wt_y_opt, new_index, 0); } unprintable_plate.set_index(new_index+1);