Changeset 553


Ignore:
Timestamp:
Dec 4, 2009 5:08:06 PM (13 years ago)
Author:
toby
Message:

# on 2002/01/23 20:53:36, toby did:
fix bugs related to adding ValidateAtomsBox?
launch import (ImportPhase/ImportAtom?) when a import format is selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addcmds.tcl

    • Property rcs:date changed from 2002/01/22 22:10:48 to 2002/01/23 20:53:36
    • Property rcs:lines changed from +82 -99 to +24 -11
    • Property rcs:rev changed from 1.27 to 1.28
    r536 r553  
    6767                -command "ImportPhase \$expgui(importFormat) $np"] \
    6868                -column 0 -row 0 -sticky e
    69         eval tk_optionMenu $np.bf.fr.b4 expgui(importFormat) \
    70                 $expgui(importFormatList)
     69        set menu [eval tk_optionMenu $np.bf.fr.b4 expgui(importFormat) \
     70                $expgui(importFormatList)]
     71        for {set i 0} {$i <= [$menu index end]} {incr i} {
     72            $menu entryconfig $i -command "ImportPhase \$expgui(importFormat) $np"
     73        }
    7174        grid $np.bf.fr.b4 -column 1 -row 0 -sticky w
    7275        grid rowconfig $np.bf.fr 0 -pad 10
     
    10461049                -command "ImportAtoms \$expgui(importFormat) $top $phase"] \
    10471050                -column 0 -row 0 -sticky e
    1048         eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
    1049                 $expgui(importFormatList)
     1051        set menu [eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
     1052                $expgui(importFormatList)]
     1053        for {set i 0} {$i <= [$menu index end]} {incr i} {
     1054            $menu entryconfig $i -command "ImportAtoms \$expgui(importFormat) $top $phase"
     1055        }
    10501056        grid $top.fr.b4 -column 1 -row 0 -sticky w
    10511057        grid rowconfig $top.fr 0 -pad 10
     
    11191125# Validate the atoms in the atoms add/phase replace box
    11201126# returns a null string on error or a list of atoms
    1121 proc ValidateAtomsBox {np} {
     1127proc ValidateAtomsBox {top np} {
     1128    global expgui
    11221129    set row 0
    11231130    # loop over the defined rows
     
    11941201    # validate the atoms info
    11951202    set atomlist [ValidateAtomsBox $top $np]
    1196     if {$atomslist == ""} return
     1203    if {$atomlist == ""} return
    11971204
    11981205    # ok add the atoms!
     
    16671674                -command "ImportPhase \$expgui(importFormat) $top"] \
    16681675                -column 0 -row 0 -sticky e
    1669         eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
    1670                 $expgui(importFormatList)
     1676        set menu [eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
     1677                $expgui(importFormatList)]
     1678        for {set i 0} {$i <= [$menu index end]} {incr i} {
     1679            $menu entryconfig $i -command "ImportPhase \$expgui(importFormat) $np"
     1680        }
    16711681        grid $top.fr.b4 -column 1 -row 0 -sticky w
    16721682        grid rowconfig $top.fr 0 -pad 10
     
    18321842                -command "ImportAtoms \$expgui(importFormat) $top $phase"] \
    18331843                -column 0 -row 0 -sticky e
    1834         eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
    1835                 $expgui(importFormatList)
     1844        set menu [eval tk_optionMenu $top.fr.b4 expgui(importFormat) \
     1845                $expgui(importFormatList)]
     1846        for {set i 0} {$i <= [$menu index end]} {incr i} {
     1847            $menu entryconfig $i -command "ImportAtoms \$expgui(importFormat) $top $phase"
     1848        }
    18361849        grid $top.fr.b4 -column 1 -row 0 -sticky w
    18371850        grid rowconfig $top.fr 0 -pad 10
     
    18591872    # validate the atoms info
    18601873    set atomlist [ValidateAtomsBox $top $np]
    1861     if {$atomslist == ""} return
     1874    if {$atomlist == ""} return
    18621875
    18631876    pleasewait "updating phase"
Note: See TracChangeset for help on using the changeset viewer.