check for flag 'typevariable' in the load geometry procedure

This commit is contained in:
Joachim Schoeberl 2010-03-17 11:11:43 +00:00
parent fc095693d9
commit f4ba49d9c0

View File

@ -47,9 +47,12 @@ menu .ngmenu.file
# {"Naomi Geometry" {.nao} }
# {"New Geometry file" {.ngg} }
# set file [tk_getOpenFile -filetypes $types -initialdir $dirname -typevariable loadgeomtypevar]
set file [tk_getOpenFile -filetypes $types -initialdir $dirname]
if {[catch {
set file [tk_getOpenFile -filetypes $types -initialdir $dirname -typevariable loadgeomtypevar]
}]} {
set file [tk_getOpenFile -filetypes $types -initialdir $dirname]
}
if {$file != ""} {
AddRecentFile $file
Ng_LoadGeometry $file