From c9db8c22a30f00ef52709024299244b496687c1e Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 5 Feb 2007 22:59:51 +0000 Subject: [PATCH] don't waste time when we aren't in dyn-view mode at all --- Nasal/dynamic_view.nas | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Nasal/dynamic_view.nas b/Nasal/dynamic_view.nas index e1a51d5cf..5a0d75f1b 100644 --- a/Nasal/dynamic_view.nas +++ b/Nasal/dynamic_view.nas @@ -243,11 +243,10 @@ main_loop = func(id) { if (id != loop_id) { return; } - if (mouse_button) { - freeze(); - } else { - var alive = elapsedN.getValue() > mouse_freeze; - if (cockpit_view and !panel_visible and alive) { + if (cockpit_view and !panel_visible) { + if (mouse_button) { + freeze(); + } elsif (elapsedN.getValue() > mouse_freeze) { view_manager.apply(); } } @@ -280,8 +279,8 @@ var view_manager = nil; var cockpit_view = nil; var panel_visible = nil; -var mouse_mode = nil; var elapsedN = nil; +var mouse_mode = nil; var mouse_freeze = 0; var mouse_button = nil;