[haiku-commits] haiku: hrev54175 - src/apps/diskusage

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 10 May 2020 05:08:32 -0400 (EDT)

hrev54175 adds 1 changeset to branch 'master'
old head: aca685fca1fb5a19a73877bf4a37ce45fee70bc9
new head: 12e4ac5d8157bb9eda511995f002158f79c23644
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=12e4ac5d8157+%5Eaca685fca1fb

----------------------------------------------------------------------------

12e4ac5d8157: DiskUsage: fix infinite loop when computing tab width
  
  Stop when we have a solution that is within 1px of accurate. Since tab
  width are rounded to the nearest pixel anyway, there is no need to
  compute further, and this could otherwise never converge due to rounding
  errors.
  
  Fixes #15944.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54175
Commit:      12e4ac5d8157bb9eda511995f002158f79c23644
URL:         https://git.haiku-os.org/haiku/commit/?id=12e4ac5d8157
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun May 10 09:03:53 2020 UTC

Ticket:      https://dev.haiku-os.org/ticket/15944

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/apps/diskusage/ControlsView.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/apps/diskusage/ControlsView.cpp 
b/src/apps/diskusage/ControlsView.cpp
index 67c1c84d00..a004b7465c 100644
--- a/src/apps/diskusage/ControlsView.cpp
+++ b/src/apps/diskusage/ControlsView.cpp
@@ -203,7 +203,7 @@ ControlsView::VolumeTabView::TabFrame(int32 index) const
                                toShave -= margins[i] - newMargin;
                                margins[i] = newMargin;
                        }
-               } while (toShave > 0 && oldToShave != toShave);
+               } while (toShave > 0 && fabs(oldToShave - toShave) >= 1.0f);
        }
 
        for (int i = 0; i < index; i++)


Other related posts:

  • » [haiku-commits] haiku: hrev54175 - src/apps/diskusage - Adrien Destugues