summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-09-19 19:35:21 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-09-19 19:35:21 (GMT)
commita2e0fe96764782a9d2757696b291be9e76ce246f (patch)
treec3a71e5f9d19b6a0e456642e2a0f7e1f2bc01440
parent1ff01ce4a0a9b54886da20b801ac0d9d3640c1f4 (diff)
downloadblt-a2e0fe96764782a9d2757696b291be9e76ce246f.zip
blt-a2e0fe96764782a9d2757696b291be9e76ce246f.tar.gz
blt-a2e0fe96764782a9d2757696b291be9e76ce246f.tar.bz2
PREFS: fix a problem updating from 7.6 to 8.0
-rw-r--r--ds9/doc/release/r8.0.html1
-rw-r--r--ds9/library/prefs.tcl19
2 files changed, 14 insertions, 6 deletions
diff --git a/ds9/doc/release/r8.0.html b/ds9/doc/release/r8.0.html
index 2fe5bb6..266f755 100644
--- a/ds9/doc/release/r8.0.html
+++ b/ds9/doc/release/r8.0.html
@@ -77,6 +77,7 @@ incorrectly calculating an index into the data cube.</tt></li>
<li><tt>09.19.2018 WCS: fix a memory ref with short axes symbols (aka 'b')</tt></li>
<li><tt>09.19.2018 AST: fix a buffer overflow issue in fitschan.c.</tt></li>
<li><tt>09.19.2018 WCS: fix a problem starting in crosshair mode set in prefs and infobox update with 2D frame.</tt></li>
+<li><tt>09.19.2018 PREFS: fix a problem updating from 7.6 to 8.0.</tt></li>
<li><tt><b>10.xx.2018 RELEASE version 8.0rc3</b></tt></li>
</ol>
</div>
diff --git a/ds9/library/prefs.tcl b/ds9/library/prefs.tcl
index d9a95e3..f2dfb59 100644
--- a/ds9/library/prefs.tcl
+++ b/ds9/library/prefs.tcl
@@ -36,13 +36,20 @@ proc LoadPrefs {} {
}
-1 {
# look for prev version
- set major [lindex [split $prefs(version) {.}] 0]
- set minor [lindex [split $prefs(version) {.}] 1]
- if {$minor>0} {
- set minor [expr $minor-1]
+ if {$prefs(version) == "8.0"} {
+ # special case for version 8.0
+ set major 7
+ set minor 6
} else {
- set major [expr $minor-1]
- set minor 9
+ # everybody else
+ set major [lindex [split $prefs(version) {.}] 0]
+ set minor [lindex [split $prefs(version) {.}] 1]
+ if {$minor>0} {
+ set minor [expr $minor-1]
+ } else {
+ set major [expr $minor-1]
+ set minor 9
+ }
}
set fn [file join $prefs(dir) "$ds9(app).${major}.${minor}$prefs(ext)"]
if {[SourceInitFile $fn] == 1} {