Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/GLSelectionRectangle.cpp')
-rw-r--r--src/slic3r/GUI/GLSelectionRectangle.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GLSelectionRectangle.cpp b/src/slic3r/GUI/GLSelectionRectangle.cpp
index a8b69d75a..d7f3f7a3a 100644
--- a/src/slic3r/GUI/GLSelectionRectangle.cpp
+++ b/src/slic3r/GUI/GLSelectionRectangle.cpp
@@ -2,6 +2,8 @@
#include "Camera.hpp"
#include "3DScene.hpp"
#include "GLCanvas3D.hpp"
+#include "GUI_App.hpp"
+#include "Plater.hpp"
#include <GL/glew.h>
@@ -35,13 +37,13 @@ namespace GUI {
m_state = Off;
- const Camera& camera = canvas.get_camera();
+ const Camera& camera = wxGetApp().plater()->get_camera();
const std::array<int, 4>& viewport = camera.get_viewport();
const Transform3d& modelview_matrix = camera.get_view_matrix();
const Transform3d& projection_matrix = camera.get_projection_matrix();
// bounding box created from the rectangle corners - will take care of order of the corners
- BoundingBox rectangle(Points{ Point(m_start_corner.cast<int>()), Point(m_end_corner.cast<int>()) });
+ BoundingBox rectangle(Points{ Point(m_start_corner.cast<coord_t>()), Point(m_end_corner.cast<coord_t>()) });
// Iterate over all points and determine whether they're in the rectangle.
for (unsigned int i = 0; i<points.size(); ++i) {
@@ -68,7 +70,7 @@ namespace GUI {
if (!is_dragging())
return;
- const Camera& camera = canvas.get_camera();
+ const Camera& camera = wxGetApp().plater()->get_camera();
float inv_zoom = (float)camera.get_inv_zoom();
Size cnv_size = canvas.get_canvas_size();