summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNickson <nicksonthanda10@msn.com>2018-09-19 23:13:56 +0100
committerHeiko Tietze <tietze.heiko@gmail.com>2018-10-18 11:24:38 +0200
commit9b0e098a785165cd9ec28c60505b60e62c3e59dc (patch)
treeb615e3e8da47b8069538f06037818586c1bb088c /vcl
parent3ffdf76d43bcfc249216e1602a016f36cb377226 (diff)
tdf#119847 - Can now autoselect font size on first click
Change-Id: Id49f4d039f0eb7c4efccecda91bd656c1c31d497 Reviewed-on: https://gerrit.libreoffice.org/60784 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/edit.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 3688f9c3374d..895d35cef5e7 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1310,7 +1310,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() < 4 )
{
mbClickedInSelection = false;
- if ( rMEvt.GetClicks() == 3 || mbSelectAllSingleClick )
+ if ( rMEvt.GetClicks() == 3 )
{
ImplSetSelection( Selection( 0, EDIT_NOLIMIT) );
ImplCopyToSelectionClipboard();
@@ -1835,7 +1835,11 @@ void Edit::GetFocus()
else if ( !mbActivePopup )
{
maUndoText = maText.toString();
-
+ if(mbSelectAllSingleClick)
+ {
+ maSelection.Min() = 0;
+ maSelection.Max() = maText.getLength();
+ }
SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
&& ( GetGetFocusFlags() & (GetFocusFlags::Init|GetFocusFlags::Tab|GetFocusFlags::CURSOR|GetFocusFlags::Mnemonic) ) )