mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +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 $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.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
|
proc help_item { helptext } {p
|
||||||
puts $helptext
|
puts $helptext
|
||||||
|
@ -623,15 +623,17 @@ proc saveoptions { } {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# the ini file is save on demand :
|
# the ini file is saved on demand :
|
||||||
proc saveinifile { } {
|
proc saveinifile { } {
|
||||||
uplevel 1 {
|
uplevel 1 {
|
||||||
set datei [open ng.ini w]
|
if {[catch { set datei [open ng.ini w] } result ]} {
|
||||||
for { set i [.ngmenu.file.recent index last] } { $i >= 1 } { incr i -1 } {
|
puts "cannot write to ng.ini file"
|
||||||
puts $datei "recentfile \"[.ngmenu.file.recent entrycget $i -label]\""
|
} {
|
||||||
}
|
for { set i [.ngmenu.file.recent index last] } { $i >= 1 } { incr i -1 } {
|
||||||
|
puts $datei "recentfile \"[.ngmenu.file.recent entrycget $i -label]\""
|
||||||
close $datei
|
}
|
||||||
|
close $datei
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -641,12 +643,14 @@ proc saveinifile { } {
|
|||||||
|
|
||||||
proc savemeshinifile { } {
|
proc savemeshinifile { } {
|
||||||
uplevel 1 {
|
uplevel 1 {
|
||||||
set datei [open ngmesh.ini w]
|
if {[catch { set datei [open ngmesh.ini w] } result } {
|
||||||
for { set i [.ngmenu.file.recentmesh index last] } { $i >= 1 } { incr i -1 } {
|
puts "cannot write to ng.ini file"
|
||||||
puts $datei "recentfile \"[.ngmenu.file.recentmesh entrycget $i -label]\""
|
} {
|
||||||
}
|
for { set i [.ngmenu.file.recentmesh index last] } { $i >= 1 } { incr i -1 } {
|
||||||
|
puts $datei "recentfile \"[.ngmenu.file.recentmesh entrycget $i -label]\""
|
||||||
close $datei
|
}
|
||||||
|
close $datei
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user