From e56eb5f4ee07d5420affc8f61d9f5dc2c2714eea Mon Sep 17 00:00:00 2001 From: rhs Date: Fri, 18 Dec 2020 09:29:54 -0600 Subject: [PATCH] Include the computed aspect ratio in the window command if ferret_set_aspect is set. --- JavaSource/resources/ferret/scripts/LAS_open_window.jnl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/JavaSource/resources/ferret/scripts/LAS_open_window.jnl b/JavaSource/resources/ferret/scripts/LAS_open_window.jnl index 7aaeec9f9..2fe9792dd 100644 --- a/JavaSource/resources/ferret/scripts/LAS_open_window.jnl +++ b/JavaSource/resources/ferret/scripts/LAS_open_window.jnl @@ -27,7 +27,6 @@ IF ($program_name"0|PyFerret>1|*>0") THEN SET TEXT/isiz=-1 CBAR ENDIF - IF `($win_aspect"0|*>1") EQ 0 AND ($ferret_view"|xy>1|xyt>1|*>0") AND ($its_prop_prop_plot"0|*>1") EQ 0` THEN IF `($fview"1|t>0|*>1") AND ($region_x_range"0") NE 0` THEN \ DEFINE SYMBOL win_aspect = `($region_Y_range)/($region_X_range)` @@ -49,6 +48,10 @@ IF `($win_aspect"0|*>1") EQ 0` THEN DEFINE SYMBOL win_aspect = 1 IF `($win_aspect) GT 100` THEN DEFINE SYMBOL win_aspect = 1 IF `($win_aspect) LT 0.01` THEN DEFINE SYMBOL win_aspect = 1 +IF ($ferret_set_aspect"1|default>1|no>0|yes>1|0|1") THEN + IF `($region_x_range"0") NE 0 AND ($region_y_range"0") NE 0` THEN \ + DEFINE SYMBOL set_window_quals = ($set_window_quals)/ASPECT = ($win_aspect):axis +ENDIF ! Set up the window. In PyFerret make the optional watermark ! on the page.