From d7651d60bfb31322e76337e503ba5e11fc4d70bc Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Tue, 23 Sep 2014 18:23:10 +0100 Subject: [PATCH] (TextInput) Don't show cut and copy buttons if text not selected Moving grab handle shows select | select all but also cut and copy which is wrong. Change-Id: Ib23feff4a97e7de6bc5d9dd6a7ec94cd64b82585 Signed-off-by: Agnelo Vaz --- base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp b/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp index 9b17229..d2c6c86 100644 --- a/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp +++ b/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp @@ -3793,7 +3793,7 @@ void TextInput::ShowPopupCutCopyPaste() mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsSelectAll, true ); } - if ( !mStyledText.empty() ) + if ( !mStyledText.empty() && IsTextSelected() ) { mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsCopy, true ); mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsCut, true ); @@ -3820,7 +3820,7 @@ void TextInput::SetUpPopupSelection( bool showCutButton ) { mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsSelectAll, true ); mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsSelect, true ); - mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsCut, showCutButton ); + mPopupPanel.TogglePopupButtonOnOff( TextInputPopup::ButtonsCut, ( showCutButton && IsTextSelected() ) ); } // if clipboard has valid contents then offer paste option if( mClipboard && mClipboard.NumberOfItems() ) -- 2.7.4