mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Use max of all dimensions instead of max of first 2
This commit is contained in:
		
							parent
							
								
									1f229f3233
								
							
						
					
					
						commit
						b2e0c1ab42
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -250,7 +250,7 @@ sub ResetModelView { | |||
|     glLoadIdentity(); | ||||
|     my $mesh_size = $self->mesh_size; | ||||
|     my $win_size = $self->GetClientSize(); | ||||
|     my $ratio = $factor * min($win_size->width, $win_size->height) / max(@$mesh_size[0..1]); | ||||
|     my $ratio = $factor * min($win_size->width, $win_size->height) / max(@$mesh_size); | ||||
|     glScalef($ratio, $ratio, 1); | ||||
| } | ||||
| 
 | ||||
|  | @ -266,7 +266,7 @@ sub Resize { | |||
|     glMatrixMode(GL_PROJECTION); | ||||
|     glLoadIdentity(); | ||||
|     my $mesh_size = $self->mesh_size; | ||||
|     glOrtho(-$x/2, $x/2, -$y/2, $y/2, 0.5, 2 * max(@$mesh_size[0..1])); | ||||
|     glOrtho(-$x/2, $x/2, -$y/2, $y/2, 0.5, 2 * max(@$mesh_size)); | ||||
|   | ||||
|     glMatrixMode(GL_MODELVIEW); | ||||
|     unless ($self->mview_init) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guillaume Seguin
						Guillaume Seguin