From 05a4e7f95c59d543f1363e2673208caa9eddbaff Mon Sep 17 00:00:00 2001
From: David Flitney <dave.flitney@ndcn.ox.ac.uk>
Date: Wed, 21 Apr 2004 13:07:27 +0000
Subject: [PATCH] *** empty log message ***

---
 fdt.tcl | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fdt.tcl b/fdt.tcl
index 9de718f..a6ea7a3 100644
--- a/fdt.tcl
+++ b/fdt.tcl
@@ -103,7 +103,7 @@ tixWidgetClass multiFileSelect {
     -superclass tixPrimitive
     -classname MultiFileSelect
     -method {
-	save
+	save load
     }
     -flag {
 	-variable -labelwidth -label -directory -pattern -title -filterhist
@@ -205,6 +205,10 @@ proc multiFileSelect:remove { w } {
 proc multiFileSelect:load { w filename } {
     upvar #0 $w data
 
+    if { ![ file exists $filename ] } {
+	MxPause "Warning: Bad or missing targets file!"
+	return
+    }
     set fd [ open $filename ]
     [$w subwidget files] delete 0 end
     while { [ gets $fd file ] >= 0 } {
@@ -903,6 +907,7 @@ proc fdt:dialog { w tclstartupfile } {
     set probtrack(mode) simple
     fdt:probtrack_mode $w $probtrack(mode)
 
+    update idletasks
     if { $tclstartupfile != "" } {
 	puts "Reading $tclstartupfile"
 	source $tclstartupfile
@@ -1258,7 +1263,7 @@ proc fdt:apply { w dialog } {
 		    if { $canwrite } {
 			puts "mkdir -p $probtrack(dir)"
 			exec mkdir -p $probtrack(dir)
-			puts "$w.data.targets save \"$probtrack(dir)/targets.txt\""
+			puts $log "$w.data.targets load \"$probtrack(dir)/targets.txt\""
 			$w.data.targets save "$probtrack(dir)/targets.txt"
 			set copylog "$probtrack(dir)/fdt.log"
 			fdt_monitor $w "$FSLDIR/bin/probtrack --mode=seeds_to_targets -x $probtrack(seed) $basics $ssopts $flags --targetmasks=${probtrack(dir)}/targets.txt --dir=$probtrack(dir)"
-- 
GitLab