mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Fixed division by zero in get_zoom_to_bounding_box_factor on Linux
This commit is contained in:
		
							parent
							
								
									fd16357b6e
								
							
						
					
					
						commit
						a4df0bdcc3
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -687,10 +687,7 @@ sub select_view { | |||
| } | ||||
| 
 | ||||
| sub get_zoom_to_bounding_box_factor { | ||||
|     my ($self, $bb) = @_; | ||||
|      | ||||
|     return undef if (! $self->init); | ||||
|      | ||||
|     my ($self, $bb) = @_;     | ||||
|     my $max_bb_size = max(@{ $bb->size }); | ||||
|     return undef if ($max_bb_size == 0); | ||||
|          | ||||
|  | @ -763,6 +760,8 @@ sub get_zoom_to_bounding_box_factor { | |||
|         $max_y = max($max_y, $margin_factor * 2 * abs($y_on_plane)); | ||||
|     } | ||||
|      | ||||
|     return undef if (($max_x == 0) || ($max_y == 0)); | ||||
|      | ||||
|     my ($cw, $ch) = $self->GetSizeWH; | ||||
|     my $min_ratio = min($cw / $max_x, $ch / $max_y); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri