]> Softwares of Agnibho - medscript.git/commitdiff
Bugfix: plugin not updating prescription
authorAgnibho Mondal <mondal@agnibho.com>
Mon, 27 Nov 2023 21:55:13 +0000 (03:25 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Mon, 27 Nov 2023 21:55:13 +0000 (03:25 +0530)
plugin.py

index 4ff2f87c262cde711ec63eea9474b3f0f9570fbe..ccdae485c8d16931dbf3381664784d7da143228a 100644 (file)
--- a/plugin.py
+++ b/plugin.py
@@ -112,10 +112,10 @@ class Plugin(QObject):
         try:
             if(hasattr(module, "web") and callable(module.web)):
                     self.webapp=WebApp()
+                    self.webapp.done.connect(lambda: prescription.set_data_from_copy(prescription_copy))
                     self.webapp.done.connect(lambda: self.update.emit())
                     prescription_copy=copy.deepcopy(prescription)
                     url, data=module.web(prescription_copy)
-                    prescription.set_data_from_copy(prescription_copy)
                     self.webapp.load(module, QUrl(url), prescription_copy, data)
                     self.webapp.show()
             elif(hasattr(module, "run") and callable(module.run)):