Merge "Make radio buttons work with size negotiation, bug fixes." into tizen
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / buttons / push-button-impl.cpp
index 153c396..34245c2 100644 (file)
@@ -638,6 +638,25 @@ float PushButton::OnAnimationTimeRequested() const
   return GetPushButtonPainter( mPainter )->GetAnimationTime();
 }
 
+void PushButton::OnButtonStageDisconnection()
+{
+  if( ButtonDown == mState )
+  {
+    if( !mToggleButton )
+    {
+      Toolkit::PushButton handle( GetOwner() );
+
+      // Notifies the painter the button has been released.
+      GetPushButtonPainter( mPainter )->Released( handle );
+
+      if( mAutoRepeating )
+      {
+        mAutoRepeatingTimer.Reset();
+      }
+    }
+  }
+}
+
 PushButton::PushButton()
 : Button(),
   mAutoRepeating( false ),