]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a visibility condition bug in 3d panel.
authorcurt <curt>
Mon, 4 Mar 2002 19:59:22 +0000 (19:59 +0000)
committercurt <curt>
Mon, 4 Mar 2002 19:59:22 +0000 (19:59 +0000)
src/Cockpit/panel.cxx

index e3fcbe6782adb68358743ecd376062d0ededa186..913fc4bfd07556011fd552e12e14fdfe2a72bbe1 100644 (file)
@@ -83,11 +83,16 @@ get_aspect_adjust (int xsize, int ysize)
 bool
 fgPanelVisible ()
 {
-    return (fgGetBool("/sim/virtual-cockpit") ||
-           ((current_panel != 0) &&
-            (current_panel->getVisibility()) &&
-            (globals->get_viewmgr()->get_current() == 0) &&
-            (globals->get_current_view()->get_view_offset() == 0.0)));
+    if(current_panel == 0)
+       return false;
+    if(current_panel->getVisibility() == 0)
+       return false;
+    if(globals->get_viewmgr()->get_current() != 0)
+       return false;
+    if(globals->get_current_view()->get_view_offset() != 0 &&
+       !fgGetBool("/sim/virtual-cockpit"))
+       return false;
+    return true;
 }