]> git.lyx.org Git - lyx.git/commit
Second tentative fix to #8159: Undo doesn't restore environment depth correctly
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 4 Jun 2012 16:02:59 +0000 (18:02 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 5 Jun 2012 09:32:56 +0000 (11:32 +0200)
commit8f01556236591a1d72c427159974d261b71198ee
tree6965fe9af537911ac44f00212eefec73701d60e7
parent5b531b56efc29fbf32efd447274e559f7d28665c
Second tentative fix to #8159: Undo doesn't restore environment depth correctly

In this version, the idea is to record undo at the place where the document is modified, which is definitely cleaner.

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
src/Buffer.cpp
src/frontends/qt4/GuiApplication.cpp