1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: Use epsilon to compare float

Fix #2394 (5)
This commit is contained in:
Diadlo 2017-11-23 16:53:35 +03:00
parent a96fbf1923
commit 91dabf11d3
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ void VideoSurface::onNewFrameAvailable(const std::shared_ptr<VideoFrame>& newFra
float newRatio = getSizeRatio(newSize); float newRatio = getSizeRatio(newSize);
if (newRatio != ratio && isVisible()) { if (qAbs(newRatio - ratio) < 1E-3 && isVisible()) {
ratio = newRatio; ratio = newRatio;
recalulateBounds(); recalulateBounds();
emit ratioChanged(); emit ratioChanged();

View File

@ -260,5 +260,5 @@ void GroupWidget::setName(const QString& name)
void GroupWidget::retranslateUi() void GroupWidget::retranslateUi()
{ {
updatePeerCount(); updateUserCount();
} }