]> Softwares of Agnibho - medscript.git/commitdiff
Automatic file extension
authorAgnibho Mondal <mondal@agnibho.com>
Fri, 27 Oct 2023 14:09:03 +0000 (19:39 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Fri, 27 Oct 2023 14:09:03 +0000 (19:39 +0530)
window.py

index 0b0924cbefa16b0618854970b0420b9d407521fe..1a80c1e6735b4eac7e073416fe2864d14f6276b9 100644 (file)
--- a/window.py
+++ b/window.py
@@ -81,6 +81,8 @@ class MainWindow(QMainWindow):
             try:
                 if not os.path.exists(self.current_file.file):
                     filename=QFileDialog.getSaveFileName(self, "Save File", suggest, "Prescriptions (*.mpaz);; All Files (*)")[0]
+                    if(not filename.endswith(".mpaz")):
+                       filename=filename+".mpaz"
                     self.current_file.set_file(filename)
                 for i in range(self.input_attachment.count()):
                     self.current_file.copy(self.input_attachment.item(i).text())