]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
Update it.po
[lyx.git] / src / LyXFunc.cpp
index 024fdb14e7cd7d619977637a955a850f652cbb6b..e5db6106bcaf4a4fc19a5207140cff01ed29da05 100644 (file)
@@ -390,9 +390,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        // FIXME: this LFUN should also work without any view.
                        Buffer * buffer = (lv && lv->documentBufferView())
                                ? &(lv->documentBufferView()->buffer()) : 0;
-                       buffer = &lv->currentBufferView()->buffer();
-                       if (buffer && !theBufferList().isLoaded(buffer))
-                               buffer = 0;
                        if (buffer)
                                buffer->undo().beginUndoGroup();
                        while (!arg.empty()) {
@@ -402,7 +399,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                func.origin = cmd.origin;
                                dispatch(func);
                        }
-                       if (buffer)
+                       // the buffer may have been closed by one action
+                       if (theBufferList().isLoaded(buffer))
                                buffer->undo().endUndoGroup();
                        break;
                }
@@ -543,20 +541,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                }
                        }
 
-                       // Is this a function that acts on inset at point?
-                       Inset * inset = bv->cursor().nextInset();
-                       if (lyxaction.funcHasFlag(action, LyXAction::AtPoint)
-                           && inset) {
-                               bv->cursor().result().dispatched(true);
-                               bv->cursor().result().update(Update::FitCursor | Update::Force);
-                               FuncRequest tmpcmd = cmd;
-                               inset->dispatch(bv->cursor(), tmpcmd);
-                               if (bv->cursor().result().dispatched()) {
-                                       updateFlags = bv->cursor().result().update();
-                                       break;
-                               }
-                       }
-
                        // Let the current Cursor dispatch its own actions.
                        Cursor old = bv->cursor();
                        bv->cursor().getPos(cursorPosBeforeDispatchX_,