mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed crashes on shader destruction on OSX.
This commit is contained in:
		
							parent
							
								
									ae2e37b4bd
								
							
						
					
					
						commit
						79ff013ea7
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		|  | @ -18,6 +18,9 @@ | |||
| package Slic3r::GUI::GLShader; | ||||
| use OpenGL(':all'); | ||||
| 
 | ||||
| # Avoid cloning this class by the worker threads. | ||||
| sub CLONE_SKIP { 1 } | ||||
| 
 | ||||
| # Shader constructor | ||||
| sub new | ||||
| { | ||||
|  |  | |||
|  | @ -264,7 +264,11 @@ sub new { | |||
|         EVT_TOOL($self, TB_SPLIT, sub { $self->split_object; }); | ||||
|         EVT_TOOL($self, TB_CUT, sub { $_[0]->object_cut_dialog }); | ||||
|         EVT_TOOL($self, TB_SETTINGS, sub { $_[0]->object_settings_dialog }); | ||||
|         EVT_TOOL($self, TB_LAYER_EDITING, sub { $self->on_layer_editing_toggled($self->{htoolbar}->GetToolState(TB_LAYER_EDITING)); }); | ||||
|         EVT_TOOL($self, TB_LAYER_EDITING, sub { | ||||
|             my $state = $self->{canvas3D}->layer_editing_enabled; | ||||
|             $self->{htoolbar}->ToggleTool(TB_LAYER_EDITING, ! $state); | ||||
|             $self->on_layer_editing_toggled(! $state); | ||||
|         }); | ||||
|     } else { | ||||
|         EVT_BUTTON($self, $self->{btn_add}, sub { $self->add; }); | ||||
|         EVT_BUTTON($self, $self->{btn_remove}, sub { $self->remove() }); # explicitly pass no argument to remove | ||||
|  | @ -476,7 +480,6 @@ sub _on_select_preset { | |||
| 
 | ||||
| sub on_layer_editing_toggled { | ||||
|     my ($self, $new_state) = @_; | ||||
|     print "on_layer_editing_toggled $new_state\n"; | ||||
|     $self->{canvas3D}->layer_editing_enabled($new_state); | ||||
|     $self->{canvas3D}->update; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv