Kaydet (Commit) 24a2e032 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Highlight the reference entry after ensuring that it's mappable.

Change-Id: I9b245c56c58b2db741e7c69c5ad480179db25ee8
üst af659d4c
...@@ -304,17 +304,6 @@ void ScXMLSourceDlg::TreeItemSelected() ...@@ -304,17 +304,6 @@ void ScXMLSourceDlg::TreeItemSelected()
} }
mpCurRefEntry = getReferenceEntry(maLbTree, pEntry); mpCurRefEntry = getReferenceEntry(maLbTree, pEntry);
if (mpCurRefEntry != pEntry)
{
// Highlight the reference entry if it differs from the current entry.
SvViewDataEntry* pView = maLbTree.GetViewDataEntry(mpCurRefEntry);
if (pView)
{
pView->SetHighlighted(true);
maLbTree.PaintEntry(mpCurRefEntry);
maHighlightedEntries.push_back(mpCurRefEntry);
}
}
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mpCurRefEntry); ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mpCurRefEntry);
OSL_ASSERT(pUserData); OSL_ASSERT(pUserData);
...@@ -404,6 +393,16 @@ void ScXMLSourceDlg::RepeatElementSelected(SvTreeListEntry& rEntry) ...@@ -404,6 +393,16 @@ void ScXMLSourceDlg::RepeatElementSelected(SvTreeListEntry& rEntry)
return; return;
} }
SvViewDataEntry* p = maLbTree.GetViewDataEntry(&rEntry);
if (!p->IsHighlighted())
{
// Highlight the entry if not highlighted already. This can happen
// when the current entry is a child entry of a repeat element entry.
p->SetHighlighted(true);
maLbTree.PaintEntry(&rEntry);
maHighlightedEntries.push_back(&rEntry);
}
SelectAllChildEntries(rEntry); SelectAllChildEntries(rEntry);
SetRangeLinkable(); SetRangeLinkable();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment