]> Softwares of Agnibho - medscript.git/commitdiff
Newline in unrenderbox
authorAgnibho Mondal <mondal@agnibho.com>
Mon, 13 Nov 2023 19:30:42 +0000 (01:00 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Mon, 13 Nov 2023 19:30:42 +0000 (01:00 +0530)
renderbox.py

index 81bf9c1323b0802603b6b8f5ff585d46bf0a3825..070b47ffd24765f89e6dbb444dd2f40ec4d6cd14 100644 (file)
@@ -117,9 +117,10 @@ class UnrenderBox(QDialog):
         for attr, value in prescription["prescriber"].items():
             if(attr not in ["properties"] and len(value)>0):
                 text=text+"<strong>"+value.upper()+"</strong><br>"
-        text=text+"<hr>"
+        text=text.replace("\n", "<br>")+"<hr>"
         for attr, value in prescription.items():
             if(attr not in ["prescriber", "custom", "properties", "file"] and len(str(value))>0 and (attr not in ["daw"] or value)):
                 text=text+"<strong>"+attr.upper()+"</strong><br>"
-                text=text+str(value)+"<br>"
+                text=text+str(value).strip()
+                text=text.replace("\n", "<br>")+"<br>"
         self.display.setText(text)