From 7243cc318a50ffa9cb337df80df79c30b2702a4a Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 14 Sep 2017 11:15:19 -0400 Subject: CONTOUR: add ability to load new contour format using original color, width, and dash options as specified in file. --- ds9/doc/release/r7.6.html | 3 ++- ds9/library/contour.tcl | 44 ++++++++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/ds9/doc/release/r7.6.html b/ds9/doc/release/r7.6.html index a008b29..08eece5 100644 --- a/ds9/doc/release/r7.6.html +++ b/ds9/doc/release/r7.6.html @@ -134,7 +134,8 @@
  • 08.24.2017 3D: fixed a problem with frame 3d backup.
  • 08.24.2017 3D: add match/lock support.
  • 09.01.2017 RULER: fixed a problem creating via GUI.
  • -
  • 09.12.2017 ELLIPSE: fixed a problem creating via GUI at zoom other than 1.
  • +
  • 09.13.2017 ELLIPSE: fixed a problem creating via GUI at zoom other than 1.
  • +
  • 09.14.2017 CONTOUR: add ability to load new contour format using original color, width, and dash options as specified in file.
  • xx.xx.2017 RELEASE version 7.6b6
  • diff --git a/ds9/library/contour.tcl b/ds9/library/contour.tcl index b7b6e96..d40c9d2 100644 --- a/ds9/library/contour.tcl +++ b/ds9/library/contour.tcl @@ -1065,27 +1065,39 @@ proc ProcessContourCmd {varname iname} { load { incr i set fn [lindex $var $i] - - # backward compatibility - incr i - set sys [lindex $var $i] - incr i - set sky [lindex $var $i] - incr i - set color [lindex $var $i] - incr i - set width [lindex $var $i] - incr i - set dash [lindex $var $i] - incr i [ProcessContourFix sys sky color width dash] - if {$fn != {}} { if {[file extension $fn] == {.con}} { - $current(frame) contour load $color $width $dash "\{$fn\}" $sys $sky + # backward compatibility + incr i + set sys [lindex $var $i] + incr i + set sky [lindex $var $i] + incr i + set color [lindex $var $i] + incr i + set width [lindex $var $i] + incr i + set dash [lindex $var $i] + incr i [ProcessContourFix sys sky color width dash] + $current(frame) contour load $color $width $dash \ + "\{$fn\}" $sys $sky } else { - $current(frame) contour load "\{$fn\}" $color $width $dash + incr i + set color [lindex $var $i] + if {$color == {} || [string range $color 0 0] == "-"} { + $current(frame) contour load "\{$fn\}" + incr i -1 + } else { + incr i + set width [lindex $var $i] + incr i + set dash [FromYesNo [lindex $var $i]] + $current(frame) contour load "\{$fn\}" \ + $color $width $dash + } } } + FileLast contourlfbox $fn UpdateContourDialog } -- cgit v0.12