Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-01-14 01:59:48 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-14 01:59:48 +0300
commit6c3d7c7f123af68d6aefaaf8f7aa09156a106d0b (patch)
treeb05ce63145f5b00c14c85de626db19ef500cdfcd /source/blender/editors/gpencil
parent29338aa2b350939a83bf4ed1c0c3082fcc27a168 (diff)
Bugfix [#25620] Grease Pencil: crash when using Ctrl+Z while drawing
Crazy users! Who on earth would try undoing in the middle of an action (here the crash occurred while a mouse button was still held)?! (At least it wouldn't have been possible for those using the DKEY + mousedrag method of invoking strokes though...)
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 63c28939c21..3a82274e356 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1636,6 +1636,13 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
estate = OPERATOR_RUNNING_MODAL;
}
}
+ /* there shouldn't be any other events, but just in case there are, let's swallow them
+ * (i.e. to prevent problems with with undo)
+ */
+ else {
+ /* swallow event to save ourselves trouble */
+ estate = OPERATOR_RUNNING_MODAL;
+ }
}
else if (p->status == GP_STATUS_IDLING) {
/* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */