From 2bf6808810d377ce53142b7e5ef3d96e08f82f32 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Thu, 2 May 2024 17:06:16 +0200 Subject: [PATCH] update canvas atthe exit --- ostap/plotting/canvas.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ostap/plotting/canvas.py b/ostap/plotting/canvas.py index fcc814df..6fed101e 100755 --- a/ostap/plotting/canvas.py +++ b/ostap/plotting/canvas.py @@ -1066,8 +1066,10 @@ def __enter__ ( self ) : ## context manager: exit def __exit__ ( self , *_ ) : - if self.__cnv and self.__plot : - self.__cnv >> self.__plot + if self.__cnv : + self.__cnv.Update() + if self.__plot : + self.__cnv >> self.__plot KeepCanvas.__exit__ ( self , *_ ) self.__cnv = None