From 93f96c770733eec6442479e374e1e62b258d7a41 Mon Sep 17 00:00:00 2001 From: ahrenholz Date: Mon, 25 Nov 2013 19:31:08 +0000 Subject: [PATCH] attempt to prevent accidental overwrite of Python script with imn file format (Boeing r1791) --- gui/filemgmt.tcl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/filemgmt.tcl b/gui/filemgmt.tcl index 2cf30cbf..098930f3 100755 --- a/gui/filemgmt.tcl +++ b/gui/filemgmt.tcl @@ -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