summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx13
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());
}