]> git.lyx.org Git - features.git/commit
Fix bug #8242: undo fails for longest label width
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 16 Jul 2012 21:39:24 +0000 (23:39 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 16 Jul 2012 21:39:24 +0000 (23:39 +0200)
commite2b42b17265f4a56ad9154cc604457d82bee83e2
tree3fa29c508d4c651b4e7aee36d48d35b43e140319
parent02ce050fb825e7707c050f04d5e69f7d1a2a5c8a
Fix bug #8242: undo fails for longest label width

In the existing code for setting layout of pragraph parameters,
Text::undoSpan is used to "guess" which paragraphs should be saved in Undo.
With this patch the approach is more precise: before every explicit change
to a paragraph, a Cursor::recordUndo call is inserted. This is much more robust than trying to guess.

In particular, we do not look at depth changes at all, since they are now
handled in updateBuffer since #8159 has been fixed.
src/Text.cpp
src/Text.h
src/Text2.cpp