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:
authorTon Roosendaal <ton@blender.org>2011-03-04 21:39:58 +0300
committerTon Roosendaal <ton@blender.org>2011-03-04 21:39:58 +0300
commit882514d28f074b37c1c7690a58c6979fcde56c45 (patch)
tree03b01a92c8163146cadaf8eeaa6046819d9254ad /source/blender/editors/transform
parent9d5c6bbe3dd5ebb7de05db482940b3e7207e8cd4 (diff)
Bugfix #26270
Transform started with button in Toolbar was drawing the helper line badly. This needed two fixes: - helper line now has poll() callback to check for correct region - event system needs to set 'subwinactive' for modal handlers too The latter might fix issues with cursor/overlay drawing in other cases?
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 5708b4fa8b7..64901e9ded3 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1243,6 +1243,15 @@ static void drawArc(float size, float angle_start, float angle_end, int segments
glEnd();
}
+static int helpline_poll(bContext *C)
+{
+ ARegion *ar= CTX_wm_region(C);
+
+ if(ar && ar->regiontype==RGN_TYPE_WINDOW)
+ return 1;
+ return 0;
+}
+
static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
{
TransInfo *t = (TransInfo*)customdata;
@@ -1557,7 +1566,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->draw_handle_apply = ED_region_draw_cb_activate(t->ar->type, drawTransformApply, t, REGION_DRAW_PRE_VIEW);
t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
//t->draw_handle_pixel = ED_region_draw_cb_activate(t->ar->type, drawTransformPixel, t, REGION_DRAW_POST_PIXEL);
- t->draw_handle_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), NULL, drawHelpline, t);
+ t->draw_handle_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), helpline_poll, drawHelpline, t);
}
else if(t->spacetype == SPACE_IMAGE) {
unit_m3(t->spacemtx);