summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 23:47:47 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 23:47:47 -0500
commitaf659d4ca2769669fe1066514f6d6279f1b8b8cb (patch)
treed7aed1461ed19d51ba0eda03b75756a0d0572d7d /svtools/source
parent949a4e15de7560f72481f2ff90f9f3b3571a8e90 (diff)
Let's make it so that selected = highlighted + logically selected.
Being selected but not highlighted makes no sense. This way, an entry can be highlighted without being selected, but can never be selected without being highlighted. Change-Id: I6c469a1d2cf0df79c2e5e4ff4120af5efd5f6103
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/contnr/treelistbox.cxx4
-rw-r--r--svtools/source/contnr/viewdataentry.cxx3
2 files changed, 3 insertions, 4 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 945fbb77015f..f55ef953dfcf 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3007,9 +3007,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
sal_uInt16 nItemType = pItem->GetType();
- bool bHighlighted = pViewDataEntry->IsHighlighted() || pViewDataEntry->IsSelected();
-
- if (bHighlighted && bSelTab && !pViewDataEntry->IsCursored())
+ if (pViewDataEntry->IsHighlighted() && bSelTab && !pViewDataEntry->IsCursored())
{
Color aNewWallColor = rSettings.GetHighlightColor();
if ( !bInUse || nItemType != SV_ITEM_ID_LBOXCONTEXTBMP )
diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx
index a7f1a9093a5a..c9c75f3f21ca 100644
--- a/svtools/source/contnr/viewdataentry.cxx
+++ b/svtools/source/contnr/viewdataentry.cxx
@@ -45,7 +45,7 @@ SvViewDataEntry::SvViewDataEntry() :
SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
nVisPos(rData.nVisPos),
mbSelected(false),
- mbHighlighted(rData.mbHighlighted),
+ mbHighlighted(false),
mbExpanded(rData.mbExpanded),
mbFocused(false),
mbCursored(rData.mbCursored),
@@ -105,6 +105,7 @@ void SvViewDataEntry::SetCursored( bool bCursored )
void SvViewDataEntry::SetSelected( bool bSelected )
{
mbSelected = bSelected;
+ mbHighlighted = bSelected;
}
void SvViewDataEntry::SetHighlighted( bool bHighlighted )