From d8f0c0bdff00975d6f7c97ebc3d7ae7b8bf3abd7 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 20 Mar 2017 15:55:22 +0100 Subject: [PATCH] Fixed bug in variable layer height editing: Make the OpenGL context current. --- lib/Slic3r/GUI/3DScene.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 391105c0d..c417c85b4 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -192,6 +192,7 @@ sub layer_editing_enabled { if (! $self->{layer_editing_initialized}) { # Enabling the layer editing for the first time. This triggers compilation of the necessary OpenGL shaders. # If compilation fails, a message box is shown with the error codes. + $self->SetCurrent($self->GetContext); my $shader = new Slic3r::GUI::_3DScene::GLShader; my $error_message; if (! $shader->load($self->_fragment_shader_variable_layer_height, $self->_vertex_shader_variable_layer_height)) {