Просмотр исходного кода

update widget.c region.c

Signed-off-by: yangfasheng <yangfasheng@rt-thread.com>
yangfasheng 7 лет назад
Родитель
Сommit
21d31f2a09
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      src/region.c
  2. 1 1
      src/widget.c

+ 2 - 2
src/region.c

@@ -616,7 +616,7 @@ rtgui_op(
             {
                 top = RTGUI_MAX(r1y1, ybot);
                 bot = RTGUI_MIN(r1->y2, r2y1);
-                if (top != bot)
+                if (top < bot)
                 {
                     curBand = newReg->data->numRects;
                     rtgui_region_appendNonO(newReg, r1, r1BandEnd, top, bot);
@@ -631,7 +631,7 @@ rtgui_op(
             {
                 top = RTGUI_MAX(r2y1, ybot);
                 bot = RTGUI_MIN(r2->y2, r1y1);
-                if (top != bot)
+                if (top < bot)
                 {
                     curBand = newReg->data->numRects;
                     rtgui_region_appendNonO(newReg, r2, r2BandEnd, top, bot);

+ 1 - 1
src/widget.c

@@ -538,7 +538,7 @@ void rtgui_widget_update_clip(rtgui_widget_t *widget)
     rtgui_widget_t *parent;
 
     /* no widget or widget is hide, no update clip */
-    if (widget == RT_NULL || RTGUI_WIDGET_IS_HIDE(widget) || widget->parent == RT_NULL)
+    if (widget == RT_NULL || RTGUI_WIDGET_IS_HIDE(widget) || widget->parent == RT_NULL || rtgui_widget_is_in_animation(widget))
         return;
 
     parent = widget->parent;