Kaydet (Commit) 78f2b0b3 authored tarafından Miklos Vajna's avatar Miklos Vajna

sfx2 classification: set initial listbox state based on doc model

This way the listbox selections shows the state of the document model,
instead of showing an empty selection by default, as it is for empty,
non-classified documents.

Change-Id: Ibda0565e3ca9ec6611d8e256a78747437b52c42a
üst 98f7e70a
......@@ -134,6 +134,11 @@ void ClassificationCategoriesController::statusChanged(const frame::FeatureState
// Normally VclBuilder::makeObject() does this.
m_pCategories->EnableAutoSize(true);
m_pCategories->SetSizePixel(m_pCategories->GetOptimalSize());
// Restore state based on the doc. model.
const OUString& rCategoryName = aHelper.GetBACName();
if (!rCategoryName.isEmpty())
m_pCategories->SelectEntry(rCategoryName);
}
} // namespace sfx2
......
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