Fixed bug in variable layer height editing: Make the OpenGL context

current.
This commit is contained in:
bubnikv 2017-03-20 15:55:22 +01:00
parent 039cd0ac5b
commit d8f0c0bdff

View File

@ -192,6 +192,7 @@ sub layer_editing_enabled {
if (! $self->{layer_editing_initialized}) { if (! $self->{layer_editing_initialized}) {
# Enabling the layer editing for the first time. This triggers compilation of the necessary OpenGL shaders. # 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. # If compilation fails, a message box is shown with the error codes.
$self->SetCurrent($self->GetContext);
my $shader = new Slic3r::GUI::_3DScene::GLShader; my $shader = new Slic3r::GUI::_3DScene::GLShader;
my $error_message; my $error_message;
if (! $shader->load($self->_fragment_shader_variable_layer_height, $self->_vertex_shader_variable_layer_height)) { if (! $shader->load($self->_fragment_shader_variable_layer_height, $self->_vertex_shader_variable_layer_height)) {