Fix T54900: radial control drawing in wrong place after recent WM changes.
This commit is contained in:
@@ -2619,10 +2619,9 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph
|
|||||||
immUnbindProgram();
|
immUnbindProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void radial_control_paint_cursor(bContext *C, int x, int y, void *customdata)
|
static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void *customdata)
|
||||||
{
|
{
|
||||||
RadialControl *rc = customdata;
|
RadialControl *rc = customdata;
|
||||||
ARegion *ar = CTX_wm_region(C);
|
|
||||||
uiStyle *style = UI_style_get();
|
uiStyle *style = UI_style_get();
|
||||||
const uiFontStyle *fstyle = &style->widget;
|
const uiFontStyle *fstyle = &style->widget;
|
||||||
const int fontid = fstyle->uifont_id;
|
const int fontid = fstyle->uifont_id;
|
||||||
@@ -2673,8 +2672,8 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Keep cursor in the original place */
|
/* Keep cursor in the original place */
|
||||||
x = rc->initial_mouse[0] - ar->winrct.xmin;
|
x = rc->initial_mouse[0];
|
||||||
y = rc->initial_mouse[1] - ar->winrct.ymin;
|
y = rc->initial_mouse[1];
|
||||||
gpuTranslate2f((float)x, (float)y);
|
gpuTranslate2f((float)x, (float)y);
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|||||||
Reference in New Issue
Block a user