* 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
.ngmenu.special.colbndcond add command -label "Automatic Assignment" \
-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" \
-command { Ng_AutoColourBcProps profile netgen.ocf; redraw }
-command { Ng_AutoColourBcProps profile ${ocffile}; redraw }
# menu .mbar.stl.menu

View File

@ -663,8 +663,10 @@ proc loadinifile { } {
set datei [open $inifilename r]
while { [gets $datei line] >= 0 } {
if {[lindex $line 0] == "recentfile"} {
set filename [lindex $line 1]
AddRecentFile $filename
set filename [lindex $line 1]
if { [file exists $filename] == 1 } {
AddRecentFile $filename
}
}
}
close $datei
@ -677,8 +679,10 @@ proc loadmeshinifile { } {
set datei [open ngmesh.ini r]
while { [gets $datei line] >= 0 } {
if {[lindex $line 0] == "recentfile"} {
set filename [lindex $line 1]
AddRecentMeshFile $filename
set filename [lindex $line 1]
if { [file exists $filename] == 1 } {
AddRecentMeshFile $filename
}
}
}
close $datei