mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Fixed track zoom computation on Qt5
This commit is contained in:
parent
b0cafe69d0
commit
0c002bc1e9
@ -85,16 +85,16 @@ qreal Track::trackScale() const
|
||||
{
|
||||
qreal bottom, top, left, right;
|
||||
|
||||
bottom = _trackPaths.at(0)->boundingRect().bottom();
|
||||
top = _trackPaths.at(0)->boundingRect().top();
|
||||
left = _trackPaths.at(0)->boundingRect().left();
|
||||
right = _trackPaths.at(0)->boundingRect().right();
|
||||
bottom = _trackPaths.at(0)->path().boundingRect().bottom();
|
||||
top = _trackPaths.at(0)->path().boundingRect().top();
|
||||
left = _trackPaths.at(0)->path().boundingRect().left();
|
||||
right = _trackPaths.at(0)->path().boundingRect().right();
|
||||
|
||||
for (int i = 1; i < _trackPaths.size(); i++) {
|
||||
bottom = qMax(bottom, _trackPaths.at(i)->boundingRect().bottom());
|
||||
top = qMin(top, _trackPaths.at(i)->boundingRect().top());
|
||||
right = qMax(right, _trackPaths.at(i)->boundingRect().right());
|
||||
left = qMin(left, _trackPaths.at(i)->boundingRect().left());
|
||||
bottom = qMax(bottom, _trackPaths.at(i)->path().boundingRect().bottom());
|
||||
top = qMin(top, _trackPaths.at(i)->path().boundingRect().top());
|
||||
right = qMax(right, _trackPaths.at(i)->path().boundingRect().right());
|
||||
left = qMin(left, _trackPaths.at(i)->path().boundingRect().left());
|
||||
}
|
||||
|
||||
QRectF br(QPointF(left, top), QPointF(right, bottom));
|
||||
|
Loading…
Reference in New Issue
Block a user