* make DocIterator::find(Inset(Math) * inset) do what it is supposed to do according to the documentation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23259 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-02-26 19:19:59 +00:00
parent eb86fb460e
commit 5622f4b560
2 changed files with 3 additions and 3 deletions

View File

@ -493,10 +493,10 @@ int DocIterator::find(MathData const & cell) const
} }
int DocIterator::find(InsetMath const * inset) const int DocIterator::find(Inset const * inset) const
{ {
for (size_t l = 0; l != slices_.size(); ++l) { for (size_t l = 0; l != slices_.size(); ++l) {
if (slices_[l].asInsetMath() == inset) if (&slices_[l].inset() == inset)
return l; return l;
} }
return -1; return -1;

View File

@ -214,7 +214,7 @@ public:
/// find index of CursorSlice with &cell() == &cell (or -1 if not found) /// find index of CursorSlice with &cell() == &cell (or -1 if not found)
int find(MathData const & cell) const; int find(MathData const & cell) const;
/// find index of CursorSlice with inset() == inset (or -1 of not found) /// find index of CursorSlice with inset() == inset (or -1 of not found)
int find(InsetMath const * inset) const; int find(Inset const * inset) const;
/// cut off CursorSlices with index > above and store cut off slices in cut. /// cut off CursorSlices with index > above and store cut off slices in cut.
void cutOff(int above, std::vector<CursorSlice> & cut); void cutOff(int above, std::vector<CursorSlice> & cut);
/// cut off CursorSlices with index > above /// cut off CursorSlices with index > above