From 519ac21fa872ae00dfea0e6743fbfbec21a87cd6 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 4 Mar 2002 19:59:22 +0000 Subject: [PATCH] Fix a visibility condition bug in 3d panel. --- src/Cockpit/panel.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index e3fcbe678..913fc4bfd 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -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; }