summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/content.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/utlui/content.cxx')
-rw-r--r--sw/source/uibase/utlui/content.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 641ee44bc6d3..3129d7ee572f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3193,8 +3193,21 @@ void SwContentTree::UpdateTracking()
{
SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
OUString aName(pSelected->GetName());
- lcl_SelectByContentTypeAndName(this, *m_xTreeView,
- SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName);
+ if (!aName.isEmpty())
+ lcl_SelectByContentTypeAndName(this, *m_xTreeView,
+ SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName);
+ else
+ {
+ // clear treeview selections
+ m_xTreeView->unselect_all();
+ Select();
+ }
+ }
+ else
+ {
+ // clear treeview selections
+ m_xTreeView->unselect_all();
+ Select();
}
return;
}