Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Stefan Schimanski wrote:
The attached patch fixes that. It should fix also a number of
other situation where cursor may be invalidated. I had to add a
test in Cursor::fixIfBroken() for the case were we are not inside
an Inset but in the main Text.
Nice! Testing it for a few minutes now. Looks fine. Couldn't cause
a crash yet.
Abdelrazak> I need a second OK. JMarc?
The general idea is correct, but...
Originally, fixIfBroken got the cursor out of insets when coordinates
were different. Now you add a different test at level 1 the just
resets the values. It would be better to rewrite fixIfBroken to do at
each level
- go out of the inset if the value of cur.inset() is not correct wrt
previous level.
How can I do that? If I erase an inset in one view while the cursor was
in this very inset in the other view, how can I know that the inset the
CursorSlice is referring to has been deleted?
The only simple solution I can think of right now is to emit a signal in
the Inset destructor that we can connect to the CursorSlice. The
CursorSlice will then invalidate itself.
Abdel.