]> git.lyx.org Git - features.git/commitdiff
make sure that INSET_APPLY dispatching is inside an undo group
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Sep 2008 13:20:53 +0000 (13:20 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Sep 2008 13:20:53 +0000 (13:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26539 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 04a9d5ddbd051b9f60c08516c2b437a8d616797a..d360d3d957c8edd0c7075dac22635d7b8d479ca6 100644 (file)
@@ -1972,11 +1972,13 @@ bool GuiView::dispatch(FuncRequest const & cmd)
                                if (!view()->setCursorFromInset(inset))
                                        LASSERT(false, /**/);
                                
+                               // useful if we are called from a dialog.
+                               view()->cursor().beginUndoGroup();
                                view()->cursor().recordUndo();
                                FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
                                inset->dispatch(view()->cursor(), fr);
+                               view()->cursor().endUndoGroup();
                        } else {
-                               view()->cursor().recordUndo();
                                FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
                                lyx::dispatch(fr);
                        }