* BufferView.C (mouseSetCursor): if the cursor was in an empty

script inset and the new position is in the nucleus of the inset,
	notifyCursorLeaves will kill the script inset itself. So we check
	all the elements of the cursor to make sure that they are correct
	(bug 2933).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16728 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2007-01-17 15:24:01 +00:00
parent 465e157b60
commit db71db23ce
3 changed files with 39 additions and 15 deletions

View File

@ -336,7 +336,24 @@ void BufferView::mouseSetCursor(LCursor & cur)
if (!badcursor && cursor().inTexted())
cursor().text()->deleteEmptyParagraphMechanism(cur, cursor());
cursor() = cur;
// if the cursor was in an empty script inset and the new
// position is in the nucleus of the inset, notifyCursorLeaves
// will kill the script inset itself. So we check all the
// elements of the cursor to make sure that they are correct.
// For an example, see bug 2933:
// http://bugzilla.lyx.org/show_bug.cgi?id=2933
// The code below could maybe be moved to a DocIterator method.
//lyxerr << "cur before " << cur <<std::endl;
DocIterator dit(cur.inset());
dit.push_back(cur.bottom());
size_t i = 1;
while (i < cur.depth() && dit.nextInset() == &cur[i].inset()) {
dit.push_back(cur[i]);
++i;
}
//lyxerr << "5 cur after" << dit <<std::endl;
cursor().setCursor(dit);
cursor().clearSelection();
cursor().setTargetX();
finishUndo();

View File

@ -1,3 +1,11 @@
2007-01-17 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView.C (mouseSetCursor): if the cursor was in an empty
script inset and the new position is in the nucleus of the inset,
notifyCursorLeaves will kill the script inset itself. So we check
all the elements of the cursor to make sure that they are correct
(bug 2933).
2006-12-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* bufferparams.C (writeLaTeX):

View File

@ -19,12 +19,18 @@ What's new
** Updates:
- Outline support.
- Outline support: it is now possible to move around parts of
documents in the Table of Contents dialog.
- Improve Computer Algebra System support.
- Improve Computer Algebra System support in math editor.
- Add support for fixed size math delimiters in math editor.
- Convert included vector graphics to pdf instead of png for pdflatex export
(bug 2868). This is implemented with the help of a new format flag "vector"
that you have to set manually for your self defined vector graphics formats
if you want to use this feature.
- Add a wmf -> eps converter (bug 2845) and a latex -> rtf converter.
- The layout lfun without an argument does now set the layout to the default
@ -41,13 +47,9 @@ What's new
- New external template for LilyPond (a music typesetter).
- New manual Extended-Insets available in English and Spanish. It describes
in detail how to work with tables, graphics, floats, notes, and boxes
- Updated documentation Intro.lyx
- Updated ifpdf documentation in Extended.lyx (+ small grammar and
spelling fixes)
- New manual ExtendedInsets available in English and Spanish. It describes
in detail how to work with tables, graphics, floats, notes, and
boxes; Update Intro and Extended manual (describe ifpdf package).
- New Galician localization; update German, Hungarian and Romanian
localization of the interface.
@ -56,10 +58,6 @@ What's new
Tutorial); Update German (all), Hebrew (Intro) and Italian
(Tutorial, UserGuide) documentation.
- Convert included vector graphics to pdf instead of png for pdflatex export
(bug 2868). This is implemented with the help of a new format flag "vector"
that you have to set manually for your self defined vector graphics formats
if you want to use this feature.
** Bug fixes:
@ -114,7 +112,8 @@ What's new
windows). This fix was already used by the official windows installer for
1.4.3.
- Fix crash when exiting empty superscript in math editor (bug 2908).
- Fix crash when exiting empty superscript in math editor (bugs 2908
and 2933).
- Fix an undo crash crash with nested font changes in math (bug 3019).