Author: mlytwyn
Date: Fri Nov 25 18:00:22 2016
New Revision: 40235
URL: http://svn.gna.org/viewcvs/gnustep?rev=40235&view=rev
Log:
Fix autoresize function due to double precision representation of tiny numbers
i.e zero
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSView.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSView.m?rev=40235&r1=40234&r2=40235&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSView.m (original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSView.m Fri Nov 25
18:00:22 2016
@@ -1976,9 +1976,9 @@
BOOL sizeFlexible,
BOOL maxMarginFlexible)
{
- const CGFloat change = newContainerSize - oldContainerSize;
- const CGFloat oldContentSize = *contentSizeInOut;
- const CGFloat oldContentPosition = *contentPositionInOut;
+ const CGFloat change = floor(newContainerSize) - floor(oldContainerSize);
+ const CGFloat oldContentSize = floor(*contentSizeInOut);
+ const CGFloat oldContentPosition = floor(*contentPositionInOut);
CGFloat flexibleSpace = 0.0;
// See how much flexible space we have to distrube the change over
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs