Explorar el Código

update ui.plot when leaving its context

Falko Schindler hace 2 años
padre
commit
0d7392c00b
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      nicegui/elements/plot.py

+ 1 - 2
nicegui/elements/plot.py

@@ -24,11 +24,10 @@ class Plot(Element):
 
     def __enter__(self):
         plt.figure(self.fig)
-
         return self
 
     def __exit__(self, *_):
         self.view.set_figure(plt.gcf())
-
         if self.close:
             plt.close(self.fig)
+        self.update()