summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f0070aa5fe01..c85863afdd2f 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -669,7 +669,6 @@ BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
void ModulWindow::BasicAddWatch()
{
AssertValidEditEngine();
- bool bAdd = true;
if ( !GetEditView()->HasSelection() )
{
TextPaM aWordStart;
@@ -679,15 +678,12 @@ void ModulWindow::BasicAddWatch()
TextSelection aSel( aWordStart );
aSel.GetEnd().GetIndex() += aWord.getLength();
GetEditView()->SetSelection( aSel );
- bAdd = true;
}
}
- 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());
}