diff --git a/ng/menustat.tcl b/ng/menustat.tcl index 93c646a8..e56b288f 100644 --- a/ng/menustat.tcl +++ b/ng/menustat.tcl @@ -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 diff --git a/ng/variables.tcl b/ng/variables.tcl index 432b4508..3148fbfb 100644 --- a/ng/variables.tcl +++ b/ng/variables.tcl @@ -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