From edea206c533053ec8d8a0851685c87551d035da3 Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 13 Jan 2017 14:05:10 -0500 Subject: [PATCH] fix problem with graphs and image zoomed out --- ds9/library/graph.tcl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl index 4e42610b7..ca507e909 100644 --- a/ds9/library/graph.tcl +++ b/ds9/library/graph.tcl @@ -261,13 +261,19 @@ proc UpdateGraph {which x y sys} { if {[$which has fits]} { if {$view(graph,horz)} { - $which get horizontal cut graphHorzX graphHorzY $x $y $sys - $ds9(graph,horz) element configure line1 -hide no + if {![catch {$which get horizontal cut graphHorzX graphHorzY $x $y $sys}]} { + $ds9(graph,horz) element configure line1 -hide no + } else { + $ds9(graph,horz) element configure line1 -hide yes + } } if {$view(graph,vert)} { - $which get vertical cut graphVertX graphVertY $x $y $sys - $ds9(graph,vert) element configure line1 -hide no + if {![catch {$which get vertical cut graphVertX graphVertY $x $y $sys}]} { + $ds9(graph,vert) element configure line1 -hide no + } else { + $ds9(graph,vert) element configure line1 -hide yes + } } } }