diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-05-26 15:30:17 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-05-27 05:57:39 +0200 |
commit | 95b9b46cca1da5f452af5e322af447fd27f82ea5 (patch) | |
tree | 91208ad6405a676db599f4eac25e2ebf0e991643 /basctl | |
parent | e2e03ffc2637c9faea8a78f04232644e66ad60c4 (diff) |
Revert "deleted variable bAdd because it does not make sense"
This reverts commit d0c0ebbcabb67b8dfd130cf4e9e666bba229f846.
+ fix bAdd logic
Change-Id: Iefa70e31c5747db1a881b1036e3d8a8995785603
Reviewed-on: https://gerrit.libreoffice.org/38072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index c85863afdd2f..d54141ffe7ab 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -669,6 +669,7 @@ BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) void ModulWindow::BasicAddWatch() { AssertValidEditEngine(); + bool bAdd = true; if ( !GetEditView()->HasSelection() ) { TextPaM aWordStart; @@ -679,11 +680,15 @@ void ModulWindow::BasicAddWatch() aSel.GetEnd().GetIndex() += aWord.getLength(); GetEditView()->SetSelection( aSel ); } + else + bAdd = false; + } + if ( bAdd ) + { + TextSelection aSel = GetEditView()->GetSelection(); + if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line selection + m_rLayout.BasicAddWatch(GetEditView()->GetSelected()); } - - TextSelection aSel = GetEditView()->GetSelection(); - if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line selection - m_rLayout.BasicAddWatch(GetEditView()->GetSelected()); } |