From 8a9897d8198882db97a0a36a8f898c10b6107448 Mon Sep 17 00:00:00 2001 From: John Wiggins Date: Tue, 15 Apr 2014 15:03:35 -0500 Subject: [PATCH 1/2] Make sure the histogram redraws when its data changes. --- ensemble/ctf/editor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ensemble/ctf/editor.py b/ensemble/ctf/editor.py index 7d08c75..23fe130 100644 --- a/ensemble/ctf/editor.py +++ b/ensemble/ctf/editor.py @@ -94,6 +94,14 @@ def _tools_default(self): tool.on_trait_change(self.update_function, 'function_updated') return editor_tools + [menu] + #------------------------------------------------------------------------ + # Traits notifications + #------------------------------------------------------------------------ + + def _histogram_changed(self): + if self.histogram is not None: + self.request_redraw() + #------------------------------------------------------------------------ # Drawing #------------------------------------------------------------------------ From a7bd7c98d4e9ff376ec17258ef9c7687a14622e2 Mon Sep 17 00:00:00 2001 From: John Wiggins Date: Tue, 15 Apr 2014 15:12:26 -0500 Subject: [PATCH 2/2] Unconditionally redraw. --- ensemble/ctf/editor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ensemble/ctf/editor.py b/ensemble/ctf/editor.py index 23fe130..1f4a2c1 100644 --- a/ensemble/ctf/editor.py +++ b/ensemble/ctf/editor.py @@ -99,8 +99,7 @@ def _tools_default(self): #------------------------------------------------------------------------ def _histogram_changed(self): - if self.histogram is not None: - self.request_redraw() + self.request_redraw() #------------------------------------------------------------------------ # Drawing