* When loading the ng.ini and ngmesh.ini files, a check is now made, to ensure that the files listed in the "Recent Files" menu entry actually exist. If they do not exist, the entries are removed from the list

* Added capability to choose a user defined profile file for colour based boundary conditions
* Minor change in menu layout for the "special->colour based boundary conditions" entry to improve clarity
This commit is contained in:
Philippose Rajan 2009-10-04 15:24:31 +00:00
parent 59cd94a1dc
commit 44ac64f85a
2 changed files with 21 additions and 5 deletions

View File

@ -788,8 +788,20 @@ menu .ngmenu.special
menu .ngmenu.special.colbndcond menu .ngmenu.special.colbndcond
.ngmenu.special.colbndcond add command -label "Automatic Assignment" \ .ngmenu.special.colbndcond add command -label "Automatic Assignment" \
-command { Ng_AutoColourBcProps auto; redraw } -command { Ng_AutoColourBcProps auto; redraw }
.ngmenu.special.colbndcond add separator
set ocffile [file join ${ngdir} netgen.ocf];
.ngmenu.special.colbndcond add command -label "Select Colour Profile file" \
-command {
set types { {"Colour Profile file" {.ocf} } }
set ocffile [tk_getOpenFile -filetypes $types]
if {$ocffile == ""} {
set ocffile [file join ${ngdir} netgen.ocf]; }
}
.ngmenu.special.colbndcond add command -label "Profile based Assignment" \ .ngmenu.special.colbndcond add command -label "Profile based Assignment" \
-command { Ng_AutoColourBcProps profile netgen.ocf; redraw } -command { Ng_AutoColourBcProps profile ${ocffile}; redraw }
# menu .mbar.stl.menu # menu .mbar.stl.menu

View File

@ -664,9 +664,11 @@ proc loadinifile { } {
while { [gets $datei line] >= 0 } { while { [gets $datei line] >= 0 } {
if {[lindex $line 0] == "recentfile"} { if {[lindex $line 0] == "recentfile"} {
set filename [lindex $line 1] set filename [lindex $line 1]
if { [file exists $filename] == 1 } {
AddRecentFile $filename AddRecentFile $filename
} }
} }
}
close $datei close $datei
} }
} }
@ -678,9 +680,11 @@ proc loadmeshinifile { } {
while { [gets $datei line] >= 0 } { while { [gets $datei line] >= 0 } {
if {[lindex $line 0] == "recentfile"} { if {[lindex $line 0] == "recentfile"} {
set filename [lindex $line 1] set filename [lindex $line 1]
if { [file exists $filename] == 1 } {
AddRecentMeshFile $filename AddRecentMeshFile $filename
} }
} }
}
close $datei close $datei
} }