Commit 765788b1 authored by Luis Penaranda's avatar Luis Penaranda

fixed automatic fov_max when using shift+wheel

parent 24d42876
...@@ -722,7 +722,17 @@ void OpenGLCanvas::wheelEvent(QWheelEvent *event){ ...@@ -722,7 +722,17 @@ void OpenGLCanvas::wheelEvent(QWheelEvent *event){
if(event->modifiers()==Qt::ShiftModifier){ if(event->modifiers()==Qt::ShiftModifier){
change_fov_max(fov_max+((double)event->delta())/30); change_fov_max(fov_max+((double)event->delta())/30);
}else{ }else{
change_fov(fov+((double)event->delta())/30); int new_fov=fov+event->delta()/30;
change_fov((double)new_fov);
if(auto_fov_max){
if(new_fov<60)
change_fov_max(60);
else
if(new_fov>180)
change_fov_max(1);
else
change_fov_max(90-new_fov/2);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment