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:
authorJulian Eisel <julian@blender.org>2020-03-06 18:22:28 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 18:27:13 +0300
commitd5572eacc5958db38ac4a4a32eddb3a2cd24bf68 (patch)
tree5252d8f509dae02bf9c137a1710c073d5bbac592 /source/blender/editors/undo
parentb242cc67928a6858a835c088e4d3ea8822c83168 (diff)
Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/ed_undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index 9a9f5885021..5b5d1338637 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -389,7 +389,7 @@ static int ed_undo_exec(bContext *C, wmOperator *op)
int ret = ed_undo_step_direction(C, 1, op->reports);
if (ret & OPERATOR_FINISHED) {
/* Keep button under the cursor active. */
- WM_event_add_mousemove(C);
+ WM_event_add_mousemove(CTX_wm_window(C));
}
ED_outliner_select_sync_from_all_tag(C);
@@ -418,7 +418,7 @@ static int ed_redo_exec(bContext *C, wmOperator *op)
int ret = ed_undo_step_direction(C, -1, op->reports);
if (ret & OPERATOR_FINISHED) {
/* Keep button under the cursor active. */
- WM_event_add_mousemove(C);
+ WM_event_add_mousemove(CTX_wm_window(C));
}
ED_outliner_select_sync_from_all_tag(C);
@@ -432,7 +432,7 @@ static int ed_undo_redo_exec(bContext *C, wmOperator *UNUSED(op))
ret = ret ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
if (ret & OPERATOR_FINISHED) {
/* Keep button under the cursor active. */
- WM_event_add_mousemove(C);
+ WM_event_add_mousemove(CTX_wm_window(C));
}
return ret;
}