X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fbutton-impl.cpp;h=0305e8a3c85dc64af40135ebbcd8a044c1b665d4;hb=49d793abda445643e4b3b270c10af70aed3d2f52;hp=1af6848989ca93f00468a95ea4aeac6ddc09bbc0;hpb=6510379ea0355c08dfe00ad9221b8fb404418702;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/buttons/button-impl.cpp b/dali-toolkit/internal/controls/buttons/button-impl.cpp index 1af6848..0305e8a3 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -289,7 +288,7 @@ void Button::ChangeState( State requestedState ) mPreviousButtonState = mButtonState; // Store previous state for visual removal (used when animations ended) mButtonState = requestedState; // Update current state - if ( Self().OnStage() ) + if ( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) { OnStateChange( mButtonState ); // Notify derived buttons SelectRequiredVisual( VISUAL_INDEX_FOR_STATE[ mButtonState ][ BACKGROUND ] ); @@ -619,7 +618,7 @@ void Button::OnInitialize() mTapDetector.Attach( self ); mTapDetector.DetectedSignal().Connect(this, &Button::OnTap); - self.SetKeyboardFocusable( true ); + self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true ); self.TouchSignal().Connect( this, &Button::OnTouch ); }