Angus Leeming wrote: > > VPList::const_iterator vpit = vps.begin(); > VPList::const_iterator vpend = vps.end(); > > for (; vpit != vpend; ++vpit) { > Paragraph * par = vpit->par; > Paragraph::inset_iterator iit = par->inset_iterator_begin(); > Paragraph::inset_iterator iend = par->inset_iterator_end(); > > for (; iit != iend; ++iit) { > lyx::pos_type const pos = iit.getPos(); > if (pos >= vpit->start && pos <= vpit->end) { > if (*iit == &inset) > return true; > if (insetContainsInset(**iit, inset)) > return true; You can write this as
if (*iit->isInsetInInset(&inset)) return true; But probably you already figured this our by yourself. Anyway the same is more or less used in BufferView::lockInset(...); (BufferView2.C). Jug -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen Vigna E-Mail: [EMAIL PROTECTED] Mitterstrich 151/A Tel/Fax: +39-0471-450260 / +39-0471-450253 I-39050 Steinegg Web: http://www.lyx.org/~jug -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._