From a28dea0617d0342c79cadf99f64f72b5d06d0286 Mon Sep 17 00:00:00 2001
From: enricoturri1966 <enricoturri@seznam.cz>
Date: Thu, 10 Feb 2022 15:11:22 +0100
Subject: [PATCH] Follow-up of 6b041429f6f137add530c900c3160d431286366f - Fixed
 uvmapping of printbed texture

---
 src/slic3r/GUI/3DBed.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp
index 0facce33c..244a802db 100644
--- a/src/slic3r/GUI/3DBed.cpp
+++ b/src/slic3r/GUI/3DBed.cpp
@@ -334,7 +334,7 @@ void Bed3D::init_triangles()
     unsigned int vertices_counter = 0;
     for (const Vec2f& v : triangles) {
         const Vec3f p = { v.x(), v.y(), GROUND_Z };
-        init_data.add_vertex(p, (Vec2f)v.cwiseProduct(inv_size).eval());
+        init_data.add_vertex(p, (Vec2f)(v - min).cwiseProduct(inv_size).eval());
         ++vertices_counter;
         if (vertices_counter % 3 == 0) {
             if (init_data.format.index_type == GLModel::Geometry::EIndexType::USHORT)