Commit 9f833ffc7ec62e347a16465dc27abf9da4212e1f

Authored by Thiago Franco de Moraes
1 parent 69812574

Only flushing mask to file when user release the mouse button on the editor

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
invesalius/data/styles.py
@@ -697,7 +697,7 @@ class EditorInteractorStyle(DefaultInteractorStyle): @@ -697,7 +697,7 @@ class EditorInteractorStyle(DefaultInteractorStyle):
697 697
698 viewer.slice_.edit_mask_pixel(operation, cursor.GetPixels(), 698 viewer.slice_.edit_mask_pixel(operation, cursor.GetPixels(),
699 position, radius, viewer.orientation) 699 position, radius, viewer.orientation)
700 - viewer._flush_buffer = True 700 + #viewer._flush_buffer = True
701 701
702 # TODO: To create a new function to reload images to viewer. 702 # TODO: To create a new function to reload images to viewer.
703 viewer.OnScrollBar() 703 viewer.OnScrollBar()
@@ -773,6 +773,7 @@ class EditorInteractorStyle(DefaultInteractorStyle): @@ -773,6 +773,7 @@ class EditorInteractorStyle(DefaultInteractorStyle):
773 if (self.viewer.slice_.buffer_slices[self.orientation].mask is None): 773 if (self.viewer.slice_.buffer_slices[self.orientation].mask is None):
774 return 774 return
775 775
  776 + self.viewer._flush_buffer = True
776 self.viewer.slice_.apply_slice_buffer_to_mask(self.orientation) 777 self.viewer.slice_.apply_slice_buffer_to_mask(self.orientation)
777 self.viewer._flush_buffer = False 778 self.viewer._flush_buffer = False
778 779