From 36252a42daad35d6334e1601e95b85e5bb1cb483 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 25 Apr 2019 15:08:14 +0200 Subject: [PATCH] Small optimization --- src/slic3r/GUI/GLCanvas3D.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 9a43ca118..e0884e6b0 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1617,12 +1617,15 @@ void GLCanvas3D::render() wxGetApp().imgui()->new_frame(); - if (m_rectangle_selection.is_dragging()) - // picking pass using rectangle selection - _rectangular_selection_picking_pass(); - else - // regular picking pass - _picking_pass(); + if (m_picking_enabled) + { + if (m_rectangle_selection.is_dragging()) + // picking pass using rectangle selection + _rectangular_selection_picking_pass(); + else + // regular picking pass + _picking_pass(); + } // draw scene glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));