mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-13 17:48:34 +05:00
* 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:
parent
59cd94a1dc
commit
44ac64f85a
@ -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
|
||||||
|
@ -663,8 +663,10 @@ proc loadinifile { } {
|
|||||||
set datei [open $inifilename r]
|
set datei [open $inifilename r]
|
||||||
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]
|
||||||
AddRecentFile $filename
|
if { [file exists $filename] == 1 } {
|
||||||
|
AddRecentFile $filename
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close $datei
|
close $datei
|
||||||
@ -677,8 +679,10 @@ proc loadmeshinifile { } {
|
|||||||
set datei [open ngmesh.ini r]
|
set datei [open ngmesh.ini r]
|
||||||
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]
|
||||||
AddRecentMeshFile $filename
|
if { [file exists $filename] == 1 } {
|
||||||
|
AddRecentMeshFile $filename
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close $datei
|
close $datei
|
||||||
|
Loading…
Reference in New Issue
Block a user