diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-11 17:40:47 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-11 17:40:47 +0400 |
commit | 944cdf04dd77cb2d109974355a69f4cb3d14d933 (patch) | |
tree | e7e90401631c5e03f6337ae308d4bc82a39ef148 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 9c9cd71a8612a2d85b10f9408199105ee09e70ad (diff) |
Fix for crash when using undo during sketching session.
Currently, grease pencil conflicts with such operators
as undo and set object mode which makes behavior totally
unpredictable and crash for some cases.
The only way to solve this proper is to ger rid of pointers
to data which can chage stored in operator custom data.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 2311f4a3a64..169443d855f 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1615,7 +1615,12 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest) static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) { tGPsdata *p= op->customdata; - int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ + //int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ + /* currently, grease pencil conflicts with such operators as undo and set object mode + which makes behavior of operator totally unpredictable and crash for some cases. + the only way to solve this proper is to ger rid of pointers to data which can + chage stored in operator custom data (sergey) */ + int estate = OPERATOR_RUNNING_MODAL; // if (event->type == NDOF_MOTION) // return OPERATOR_PASS_THROUGH; |