Skip to content

Commit

Permalink
Fixed text input when image is rotated.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Mar 12, 2024
1 parent 54142ab commit 644e550
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mrv2/lib/mrvGL/mrvTimelineViewportEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@ namespace mrv
shape->fontSize = w->textsize() / p.viewZoom * pixels_unit;
auto pos = math::Vector2i(w->x() + offset.x, w->y() + offset.y);
pos = _getFocus(pos.x, pos.y);
float rotation = p.rotation;
float videoRotation = p.videoRotation;
p.rotation = 0.F;
p.videoRotation = 0.F;
pnt = _getRasterf(pos.x, pos.y);
p.rotation = rotation;
p.videoRotation = videoRotation;
shape->pts[0].x = pnt.x;
shape->pts[0].y = pnt.y;
#else
Expand Down

0 comments on commit 644e550

Please sign in to comment.