Refactored Model.cpp/hpp to C++x11 loops,
simplified the mesh / bbox handling.
This commit is contained in:
bubnikv 2017-06-13 11:35:24 +02:00
parent 21ddcb8487
commit 5cae4cc614
13 changed files with 314 additions and 500 deletions

View file

@ -547,7 +547,8 @@ sub mouse_wheel_event {
$zoom /= 10;
$zoom = $self->_zoom / (1-$zoom);
# Don't allow to zoom too far outside the scene.
my $zoom_min = $self->get_zoom_to_bounding_box_factor($self->max_bounding_box) * 0.4;
my $zoom_min = $self->get_zoom_to_bounding_box_factor($self->max_bounding_box);
$zoom_min *= 0.4 if defined $zoom_min;
$zoom = $zoom_min if defined $zoom_min && $zoom < $zoom_min;
$self->_zoom($zoom);