From 9f833ffc7ec62e347a16465dc27abf9da4212e1f Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Mon, 1 Jun 2015 10:29:48 -0300 Subject: [PATCH] Only flushing mask to file when user release the mouse button on the editor --- invesalius/data/styles.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 73a89c4..3200f67 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -697,7 +697,7 @@ class EditorInteractorStyle(DefaultInteractorStyle): viewer.slice_.edit_mask_pixel(operation, cursor.GetPixels(), position, radius, viewer.orientation) - viewer._flush_buffer = True + #viewer._flush_buffer = True # TODO: To create a new function to reload images to viewer. viewer.OnScrollBar() @@ -773,6 +773,7 @@ class EditorInteractorStyle(DefaultInteractorStyle): if (self.viewer.slice_.buffer_slices[self.orientation].mask is None): return + self.viewer._flush_buffer = True self.viewer.slice_.apply_slice_buffer_to_mask(self.orientation) self.viewer._flush_buffer = False -- libgit2 0.21.2