]> git.lyx.org Git - lyx.git/commit
* fix bug 4055, overdue patch from Stefan Schimanski:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 17 Dec 2007 18:13:02 +0000 (18:13 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 17 Dec 2007 18:13:02 +0000 (18:13 +0000)
commit8672364e1e1f0e082678d0cf0f03e7e84c99d35d
tree9c89f870ffc9a6b4f7f90ffb9d26cea3c4616948
parentb07d4d3e60fc3d520b6749dcdd9092f1064edcef
* fix bug 4055, overdue patch from Stefan Schimanski:

"The idea of the beforeDispX/Y_ variables in the Cursor is to hold the position
of the cursor on screen before the lyxfunc is dispatched. But to get this the
metrics must be valid. It's updated in Cursor::dispatch before the dispatch
loop.
After inserting/deleting stuff (like when deleting the selected text before
inserting the alpha) the metrics are invalid. But the handler for the alpha
calls Cursor::dispatch after the deletion and hence the crash with your second
patch.

Here is a patch fixing that:

The beforeDispatchXY variable do not belong into the Cursor::dispatch because
Cursor::dispatch is often called "manually" by many handlers to some followup
action. So this logic must go somewhere else where it is sure that is not
updated after the metrics got invalidated."

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22193 a592a061-630c-0410-9148-cb99ea01b6c8
src/Cursor.cpp
src/Cursor.h
src/LyXFunc.cpp
src/LyXFunc.h
src/Text3.cpp