if (displ++ == 0)
{
- m_IndexList->SetSelection(0);
- DisplayIndexItem(&index[i]);
+ // don't automatically show topic selector if this
+ // item points to multiple pages:
+ if (index[i].items.size() == 1)
+ {
+ m_IndexList->SetSelection(0);
+ DisplayIndexItem(&index[i]);
+ }
}
// if this is nested item of the index, show its parent(s)
m_IndexList->Append(index[i].name, (char*)(&index[i]));
if (first)
{
- DisplayIndexItem(&index[i]);
+ // don't automatically show topic selector if this
+ // item points to multiple pages:
+ if (index[i].items.size() == 1)
+ {
+ DisplayIndexItem(&index[i]);
+ }
first = false;
}
}