Browse Source

fix: Use epsilon to compare float

Fix #2394 (5)
reviewable/pr4824/r1
Diadlo 8 years ago
parent
commit
91dabf11d3
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 2
      src/video/videosurface.cpp
  2. 2
      src/widget/groupwidget.cpp

2
src/video/videosurface.cpp

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

2
src/widget/groupwidget.cpp

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

Loading…
Cancel
Save