attempt to prevent accidental overwrite of Python script with imn file format

(Boeing r1791)
This commit is contained in:
ahrenholz 2013-11-25 19:31:08 +00:00
parent d9b564acb4
commit 93f96c7707

View file

@ -227,6 +227,11 @@ proc saveFile { selectedFile } {
set fileName [file tail $currentFile] set fileName [file tail $currentFile]
if { [file extension $selectedFile] == ".xml" } { if { [file extension $selectedFile] == ".xml" } {
xmlFileLoadSave save $selectedFile xmlFileLoadSave save $selectedFile
} elseif { [file extension $selectedFile] == ".py" } {
set msg "Python script files cannot be saved by the GUI."
set msg "$msg\nUse File > Export Python script... for export."
tk_messageBox -type ok -icon warning -message $msg -title "Error"
} else { } else {
set fileId [open $currentFile w] set fileId [open $currentFile w]
dumpCfg file $fileId dumpCfg file $fileId