From 0474cbd424063065024eb66c849f6d33a9aadec9 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 27 Feb 2015 16:11:13 -0300 Subject: [PATCH] The use of ctrl and shift in the draw and erase pen --- invesalius/data/styles.py | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 27afba0..9c71407 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -570,6 +570,12 @@ class EditorInteractorStyle(DefaultInteractorStyle): elif iren.GetShiftKey(): operation = const.BRUSH_THRESH_ADD_ONLY + elif operation == const.BRUSH_ERASE and iren.GetControlKey(): + operation = const.BRUSH_DRAW + + elif operation == const.BRUSH_DRAW and iren.GetControlKey(): + operation = const.BRUSH_ERASE + viewer._set_editor_cursor_visibility(1) mouse_x, mouse_y = iren.GetEventPosition() @@ -626,6 +632,12 @@ class EditorInteractorStyle(DefaultInteractorStyle): elif iren.GetShiftKey(): operation = const.BRUSH_THRESH_ADD_ONLY + elif operation == const.BRUSH_ERASE and iren.GetControlKey(): + operation = const.BRUSH_DRAW + + elif operation == const.BRUSH_DRAW and iren.GetControlKey(): + operation = const.BRUSH_ERASE + # TODO: Improve! #for i in self.slice_data_list: #i.cursor.Show(0) -- libgit2 0.21.2