Changeset 21


Ignore:
Timestamp:
Dec 4, 2009 4:59:02 PM (14 years ago)
Author:
toby
Message:

# on 1999/01/07 04:43:03, toby did:
misc fixes:

set working directory when expgui(expfile) is changed because GSAS must be
run in the directory of the EP file

fixup relative paths if used for the script name

fix bug in expgui(gsasexe) file join

in DisplayProfile? & make sure that entrycmd(trace) is as 0 when return is done

add Override backspace to options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 1999/01/06 04:15:12 to 1999/01/07 04:43:03
    • Property rcs:lines changed from +439 -266 to +23 -6
    • Property rcs:rev changed from 1.5 to 1.6
    r20 r21  
    3737}
    3838if {$expgui(expfile) == ""} exit
     39catch {cd [string trim [file dirname $expgui(expfile)]]}
    3940
    4041set expgui(debug) 0
     
    9394    }
    9495}
     96# fixup relative paths
     97if {[file pathtype $expgui(script)] == "relative"} {
     98    set expgui(script) [file join [pwd] $expgui(script)]
     99}
    95100set expgui(scriptdir) [file dirname $expgui(script) ]
    96101set expgui(gsasdir) [file dirname $expgui(scriptdir)]
    97 set expgui(gsasexe) [file join $ expgui(gsasdir) exe]
     102set expgui(gsasexe) [file join $expgui(gsasdir) exe]
    98103#----------------------------------------------------------------
    99104# fetch EXP file processing routines
     
    231236                [getstring "title for experiment $newexpfile" 60 0]
    232237    set expgui(expfile) $newexpfile
     238    catch {cd [string trim [file dirname $expgui(expfile)]]}
    233239    loadexp $expgui(expfile)
    234240}
     
    242248    if {$newexpfile == ""} return
    243249    set expgui(expfile) $newexpfile
     250    catch {cd [string trim [file dirname $expgui(expfile)]]}
    244251    expwrite $expgui(expfile)
    245252    set expgui(changed) 0
     
    270277    if {$newexpfile == ""} return
    271278    set expgui(expfile) $newexpfile
     279    catch {cd [string trim [file dirname $expgui(expfile)]]}
    272280    loadexp $expgui(expfile)
    273281}
     
    15101518    }
    15111519
    1512     # disable traces on entryvar for right now
    1513     set entrycmd(trace) 0
    15141520    # destroy the contents of the frame
    15151521    eval destroy [grid slaves  $expgui(ProfileBox).f]
     
    15181524        # must have at least one histogram selected here
    15191525        if {[llength $expgui(curhist)] == 0} return
     1526        # disable traces on entryvar for right now
     1527        set entrycmd(trace) 0
    15201528        set hist [lindex $expmap(powderlist) $expgui(curhist)]
    15211529        # Create one frame for each Phase.
     
    15831591        # must have at least one histogram selected here
    15841592        if {[llength $histlist] == 0} return
     1593        # disable traces on entryvar for right now
     1594        set entrycmd(trace) 0
    15851595        # loop through histograms & phases, set up an array by type
    15861596        catch {unset ptypearray histarray phasearray}
     
    17301740        $expgui(lsFrame).hs.lbox selection set $h
    17311741    }
    1732     # disable traces on entryvar for right now
    1733     set entrycmd(trace) 0
    17341742
    17351743    # get histogram list
     
    17491757        }
    17501758    } elseif {[llength $histlist] == 1} {
     1759        # disable traces on entryvar
     1760        set entrycmd(trace) 0
    17511761        set entryvar(fobsextract) [histinfo $histlist foextract]
    17521762        foreach phase {1 2 3 4 5 6 7 8 9} {
     
    17691779        }
    17701780    } elseif {[llength $histlist] > 1} {
     1781        # disable traces on entryvar
     1782        set entrycmd(trace) 0
    17711783        # multiple histograms need phases in any histogram
    17721784        foreach phase {1 2 3 4 5 6 7 8 9} {
     
    28752887set  expgui(globalmode) 0
    28762888
     2889if {$tcl_platform(platform) != "windows"} {
     2890    $expgui(fm).option.menu  add checkbutton -label "Override backspace" \
     2891            -variable env(GSASBACKSPACE)
     2892}
     2893
    28772894pack $expgui(fm).file $expgui(fm).option -side left  -in $expgui(fm)
    28782895
Note: See TracChangeset for help on using the changeset viewer.