]> git.lyx.org Git - features.git/commitdiff
bug 2172: buffer not marked dirty after LFUN_CUT
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 23 Dec 2005 12:19:56 +0000 (12:19 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 23 Dec 2005 12:19:56 +0000 (12:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10678 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxfunc.C

index c4ec81f3032b3c8db7093debd92ed04afb589aff..4ea6cc06fe6d0de1d9aae7ab28144084f72bb95e 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-22  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * lyxfunc.C (dispatch): do not call getStatus again to determine
+       whether a lfun is disabled (bug 2172).
+
 2005-12-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * cursor.C (macroModeClose): set the cursor inside the new math
index 23c7a5f2ea937c90cb838a2b2d6197a265af3b83..b204a709004f7088f1db3c3a46fe33ef5bbd0d52 100644 (file)
@@ -1592,10 +1592,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                view()->update(Update::FitCursor);
 
                        // if we executed a mutating lfun, mark the buffer as dirty
-                       // FIXME: Why not use flag.enabled() but call getStatus again?
-                       if (getStatus(cmd).enabled()
-                                       && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)
-                                       && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly))
+                       if (flag.enabled()
+                           && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)
+                           && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly))
                                view()->buffer()->markDirty();
                }