Fix (coverity-reported) broken 'transform helpers' drawing.
E.g. trackball-arrows (R-R) were no more visible. Caused by wrong cast of an array from int to float, we need an int version of those helpers (`glTranslatenxv`) too.
This commit is contained in:
@@ -1720,7 +1720,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
|
||||
glVertex2fv(cent);
|
||||
glEnd();
|
||||
|
||||
glTranslate2fv((const float *)mval);
|
||||
glTranslate2iv(mval);
|
||||
glRotatef(-RAD2DEGF(atan2f(cent[0] - t->mval[0], cent[1] - t->mval[1])), 0, 0, 1);
|
||||
|
||||
setlinestyle(0);
|
||||
@@ -1732,7 +1732,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
|
||||
case HLP_HARROW:
|
||||
UI_ThemeColor(TH_VIEW_OVERLAY);
|
||||
|
||||
glTranslate2fv((const float *)mval);
|
||||
glTranslate2iv(mval);
|
||||
|
||||
glLineWidth(3.0);
|
||||
drawArrow(RIGHT, 5, 10, 5);
|
||||
@@ -1742,7 +1742,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
|
||||
case HLP_VARROW:
|
||||
UI_ThemeColor(TH_VIEW_OVERLAY);
|
||||
|
||||
glTranslate2fv((const float *)mval);
|
||||
glTranslate2iv(mval);
|
||||
|
||||
glLineWidth(3.0);
|
||||
drawArrow(UP, 5, 10, 5);
|
||||
@@ -1793,7 +1793,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
|
||||
unsigned char col[3], col2[3];
|
||||
UI_GetThemeColor3ubv(TH_GRID, col);
|
||||
|
||||
glTranslate2fv((const float *)mval);
|
||||
glTranslate2iv(mval);
|
||||
|
||||
glLineWidth(3.0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user