diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-05 00:36:10 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-05 00:53:31 +0100 |
commit | 66f8bbc1b2e7397557d0d6434b90bc5af561acbd (patch) | |
tree | d9cef1534c06e6595d6c652a6fd43e9fbdc6fd30 /sfx2 | |
parent | 2fc87188bd4a73d25b64b32e0287cee5d6ee4a48 (diff) |
SfxCommonTemplateDialog_Impl::SelectStyle:
Deselect everything before selecting a style. Fixes the problem that
travelling around with the cursor leads to accumulating multiple
selection of every style the cursor runs across.
(regression from 439ac45925039aa7a537feedab3e731e8a60a8e5)
Change-Id: I5d51122a719a160c6428e196b32264a90f984579
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 31920f202a36..c5f2870eb67b 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1045,10 +1045,14 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) bSelect = sal_False; else { - aFmtLb.MakeVisible( pEntry ); - aFmtLb.Select( pEntry ); - bWaterDisabled = (aFmtLb.GetSelectionCount() <=1 ? sal_False : sal_True); - FmtSelectHdl( NULL ); + if (!aFmtLb.IsSelected(pEntry)) + { + aFmtLb.MakeVisible( pEntry ); + aFmtLb.SelectAll(false); + aFmtLb.Select( pEntry ); + bWaterDisabled = (aFmtLb.GetSelectionCount() <=1 ? sal_False : sal_True); + FmtSelectHdl( NULL ); + } } } |