Fixed assert because comparing the float and int.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 18 Mar 2013 04:43:51 +0000 (13:43 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 18 Mar 2013 05:25:16 +0000 (14:25 +0900)
Change-Id: Ie4d3f15d4aed6fe75c513a61c773791f39f8e58f

src/ui/FUi_Control.cpp
src/ui/inc/FUi_Control.h

index 9a5b933..2686d83 100644 (file)
@@ -402,7 +402,7 @@ public:
 
        result SetItemBounds(const FloatRectangle& rect)
        {
-               SysAssert(__pControl->IsInSizeRange(Dimension(_CoordinateSystemUtils::ConvertToInteger(rect.width), _CoordinateSystemUtils::ConvertToInteger(rect.height))));
+               SysAssert(__pControl->IsInSizeRange(FloatDimension(rect.width, rect.height)));
                return __pControl->SetBoundsFinal(rect, false, true);
        }
 
@@ -2884,7 +2884,14 @@ _Control::UpdateBoundsOfVisualElement(const FloatRectangle& controlBounds)
 }
 
 bool
-_Control::IsInSizeRange(const Dimension& size)
+_Control::IsInSizeRange(const Dimension& size) const
+{
+       return (__minSize.width <= size.width) && (size.width <= __maxSize.width) &&
+                  (__minSize.height <= size.height) && (size.height <= __maxSize.height);
+}
+
+bool
+_Control::IsInSizeRange(const FloatDimension& size) const
 {
        return (__minSize.width <= size.width) && (size.width <= __maxSize.width) &&
                   (__minSize.height <= size.height) && (size.height <= __maxSize.height);
index 642a282..931e4fb 100644 (file)
@@ -538,7 +538,8 @@ private:
 
        void ReleaseHandle(void);
 
-       bool IsInSizeRange(const Tizen::Graphics::Dimension& size);
+       bool IsInSizeRange(const Tizen::Graphics::Dimension& size) const;
+       bool IsInSizeRange(const Tizen::Graphics::FloatDimension& size) const;
        result AdjustSizeToRange(void);
        result SetBoundsInternal(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks, bool callUpdateBoundsOfVisualElement = true);
        result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool callUpdateBoundsOfVisualElement = true);