mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
does not try to create ini file if there is no write permission
This commit is contained in:
parent
b8d71dd7a5
commit
1c7f2356e0
@ -187,7 +187,7 @@ set_control_help $f.first "First step in mesh generation. Usually, meshing star
|
||||
set_control_help $f.last "Last step in mesh generation. If only the surface mesh is required, please set \"Last Step\" to \"Optimize Surface\""
|
||||
|
||||
set_control_help .bubar.surfm "Start mesh generation"
|
||||
set_control_help .bubar.stopm "Start mesh generation"
|
||||
set_control_help .bubar.stopm "Stop mesh generation"
|
||||
|
||||
proc help_item { helptext } {p
|
||||
puts $helptext
|
||||
|
@ -623,16 +623,18 @@ proc saveoptions { } {
|
||||
|
||||
|
||||
|
||||
# the ini file is save on demand :
|
||||
# the ini file is saved on demand :
|
||||
proc saveinifile { } {
|
||||
uplevel 1 {
|
||||
set datei [open ng.ini w]
|
||||
if {[catch { set datei [open ng.ini w] } result ]} {
|
||||
puts "cannot write to ng.ini file"
|
||||
} {
|
||||
for { set i [.ngmenu.file.recent index last] } { $i >= 1 } { incr i -1 } {
|
||||
puts $datei "recentfile \"[.ngmenu.file.recent entrycget $i -label]\""
|
||||
}
|
||||
|
||||
close $datei
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -641,13 +643,15 @@ proc saveinifile { } {
|
||||
|
||||
proc savemeshinifile { } {
|
||||
uplevel 1 {
|
||||
set datei [open ngmesh.ini w]
|
||||
if {[catch { set datei [open ngmesh.ini w] } result } {
|
||||
puts "cannot write to ng.ini file"
|
||||
} {
|
||||
for { set i [.ngmenu.file.recentmesh index last] } { $i >= 1 } { incr i -1 } {
|
||||
puts $datei "recentfile \"[.ngmenu.file.recentmesh entrycget $i -label]\""
|
||||
}
|
||||
|
||||
close $datei
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user