dmuratshin 9 years ago
parent
commit
febbbba624
1 changed files with 2 additions and 2 deletions
  1. 2 2
      oxygine/src/Actor.cpp

+ 2 - 2
oxygine/src/Actor.cpp

@@ -366,7 +366,7 @@ namespace oxygine
 
 
         TouchEvent click(0);
         TouchEvent click(0);
 
 
-        if (event->type == TouchEvent::TOUCH_UP)
+        if (event->type == TouchEvent::TOUCH_UP &&  event->target.get() == this)
         {
         {
             TouchEvent* te = safeCast<TouchEvent*>(event);
             TouchEvent* te = safeCast<TouchEvent*>(event);
             if (_pressedButton[te->mouseButton] == te->index)
             if (_pressedButton[te->mouseButton] == te->index)
@@ -399,7 +399,7 @@ namespace oxygine
             }
             }
         }
         }
 
 
-        if (click.type && event->target.get() == this)
+        if (click.type)
         {
         {
             //send click event at the end after TOUCH_UP event
             //send click event at the end after TOUCH_UP event
             dispatchEvent(&click);
             dispatchEvent(&click);