attempt to prevent accidental overwrite of Python script with imn file format
(Boeing r1791)
This commit is contained in:
parent
d9b564acb4
commit
93f96c7707
1 changed files with 5 additions and 0 deletions
|
@ -227,6 +227,11 @@ proc saveFile { selectedFile } {
|
|||
set fileName [file tail $currentFile]
|
||||
if { [file extension $selectedFile] == ".xml" } {
|
||||
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 {
|
||||
set fileId [open $currentFile w]
|
||||
dumpCfg file $fileId
|
||||
|
|
Loading…
Reference in a new issue