]> git.lyx.org Git - features.git/commitdiff
create a proper undo group before unifying graphics group (crystal clear, isn t it?)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 23 Sep 2008 21:57:23 +0000 (21:57 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 23 Sep 2008 21:57:23 +0000 (21:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26508 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiGraphics.cpp

index cea974402d503cdeaae6be29aa39966c1968534b..09454b8f6c3a4fdc7567cbfc2a2fafdba1446ca2 100644 (file)
 #include <config.h>
 
 #include "GuiGraphics.h"
-
-#include "LengthCombo.h"
-#include "Length.h"
-#include "LyXRC.h"
 #include "qt_helpers.h"
 #include "Validator.h"
 
+#include "Buffer.h"
 #include "FuncRequest.h"
+#include "LengthCombo.h"
+#include "Length.h"
+#include "LyXRC.h"
+#include "Undo.h"
 
 #include "graphics/GraphicsCache.h"
 #include "graphics/GraphicsCacheItem.h"
@@ -715,10 +716,12 @@ void GuiGraphics::dispatchParams()
 {
        InsetGraphicsParams tmp_params(params_);
        string const lfun = InsetGraphics::params2string(tmp_params, buffer());
+       buffer().undo().beginUndoGroup();
        dispatch(FuncRequest(getLfun(), lfun));
        if (!params_.groupId.empty())
                dispatch(FuncRequest(LFUN_GRAPHICS_GROUPS_UNIFY,
                                InsetGraphics::params2string(params_, buffer())));
+       buffer().undo().endUndoGroup();
 }