gizmos: use scale instead of matrix transform

Improves appearance of gizmos lines and ensures other controls are drawn in
UI dimensions rather than texture dimensions.
This commit is contained in:
itsmattkc
2020-05-06 17:45:44 +10:00
parent 1ceefb6dba
commit 67854a2c97
8 changed files with 32 additions and 25 deletions
+1 -6
View File
@@ -299,12 +299,7 @@ void ViewerDisplayWidget::paintGL()
NodeValueDatabase db = gt.GenerateDatabase(gizmos_, TimeRange(node_time, node_time));
QPainter p(this);
// Scale so that gizmos can just draw on the buffer
QPointF tex_point = GetTexturePosition(size());
p.scale(tex_point.x(), tex_point.y());
gizmos_->DrawGizmos(db, &p);
gizmos_->DrawGizmos(db, &p, QVector2D(GetTexturePosition(size())));
}
// Draw action/title safe areas