Changeset 16 for sans/utils


Ignore:
Timestamp:
Dec 12, 2006 2:30:55 PM (16 years ago)
Author:
ajj
Message:

Removed variable and used cd to change to newly selected dir. Notice bug whereby changing directory created a new listing, but plot wouldn't work since cwd hadn't changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/utils/bt5/bt5plot/bt5plot

    r15 r16  
    22 
    33package require BLT 
    4  
    5 # Set default directory 
    6  
    7 set defdir [pwd]  
    84 
    95set images(normal) [image create photo -format gif -data { 
     
    157153 
    158154proc LoadTree { tree parentNode dir } { 
    159         set saved [pwd] 
    160155        cd $dir 
    161156        foreach f [lsort [glob *.bt5]] { 
    162157                set e [$tree insert $parentNode -label $f -data "Plot 0"] 
    163158        } 
    164         cd $saved 
    165159} 
    166160 
     
    172166         
    173167        global .tree  
    174         global defdir 
    175168         
    176169        set dir [tk_chooseDirectory -title "Set Data Directory"] 
     
    179172                EmptyTree .tree 
    180173                LoadTree .tree 0 $dir 
    181                 set defdir $dir  
     174                cd $dir 
    182175        }        
    183176} 
     
    186179 
    187180        global .tree 
    188         global defdir 
    189181 
    190182        EmptyTree .tree 
    191         LoadTree .tree 0 $defdir 
     183        LoadTree .tree 0 [pwd] 
    192184} 
    193185 
     
    196188         
    197189        global .tree 
    198         global defdir 
    199190 
    200191        resetTree 
     
    218209# Create tree 
    219210blt::tree create .tree 
    220 LoadTree .tree 0 $defdir  
     211LoadTree .tree 0 [pwd] 
    221212 
    222213# Create view+plot frame 
Note: See TracChangeset for help on using the changeset viewer.