]> git.lyx.org Git - features.git/blobdiff - src/LyXFunc.cpp
LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR -> LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE.
[features.git] / src / LyXFunc.cpp
index 7a639d4272ea6f1b1af65946d98c548bb67ce2ee..920ffa84bd136b22c8860b1d0fb0633a2ae6207d 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "LyXFunc.h"
 
-#include "BaseClassList.h"
+#include "LayoutFile.h"
 #include "BranchList.h"
 #include "buffer_funcs.h"
 #include "Buffer.h"
@@ -607,7 +607,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_DIALOG_DISCONNECT_INSET:
        case LFUN_BUFFER_CHILD_OPEN:
        case LFUN_UI_TOGGLE:
-       case LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR:
+       case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
        case LFUN_KEYMAP_OFF:
        case LFUN_KEYMAP_PRIMARY:
        case LFUN_KEYMAP_SECONDARY:
@@ -709,14 +709,14 @@ void showPrintError(string const & name)
 
 bool loadLayoutFile(string const & name, string const & buf_path)
 {
-       if (!BaseClassList::get().haveClass(name)) {
+       if (!LayoutFileList::get().haveClass(name)) {
                lyxerr << "Document class \"" << name
                       << "\" does not exist."
                       << endl;
                return false;
        }
 
-       LayoutFile & tc = BaseClassList::get()[name];
+       LayoutFile & tc = LayoutFileList::get()[name];
        if (!tc.load(buf_path)) {
                docstring s = bformat(_("The document class %1$s."
                                   "could not be loaded."), from_utf8(name));
@@ -1324,7 +1324,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
                }
 
-               case LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR:
+               case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
                        BOOST_ASSERT(lyx_view_);
                        lyxrc.cursor_follows_scrollbar = !lyxrc.cursor_follows_scrollbar;
                        break;
@@ -1523,13 +1523,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_BUFFER_PARAMS_APPLY: {
                        BOOST_ASSERT(lyx_view_);
-                       biblio::CiteEngine const oldEngine =
-                                       lyx_view_->buffer()->params().getEngine();
                        
                        Buffer * buffer = lyx_view_->buffer();
-
                        DocumentClass * oldClass = buffer->params().documentClassPtr();
-
                        Cursor & cur = view()->cursor();
                        cur.recordUndoFullDocument();
                        
@@ -1547,24 +1543,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        
                        updateLayout(oldClass, buffer);
                        
-                       biblio::CiteEngine const newEngine =
-                                       lyx_view_->buffer()->params().getEngine();
-                       
-                       if (oldEngine != newEngine) {
-                               FuncRequest fr(LFUN_INSET_REFRESH);
-       
-                               Inset & inset = lyx_view_->buffer()->inset();
-                               InsetIterator it  = inset_iterator_begin(inset);
-                               InsetIterator const end = inset_iterator_end(inset);
-                               for (; it != end; ++it)
-                                       if (it->lyxCode() == CITE_CODE)
-                                               it->dispatch(cur, fr);
-                       }
-                       
                        updateFlags = Update::Force | Update::FitCursor;
-                       // We are here most certainaly because of a change in the document
-                       // It is then better to make sure that all dialogs are in sync
-                       // with current document settings. LyXView::restartCursor() achieve this.
+                       // We are most certainly here because of a change in the document
+                       // It is then better to make sure that all dialogs are in sync with
+                       // current document settings. LyXView::restartCursor() achieve this.
                        lyx_view_->restartCursor();
                        break;
                }
@@ -1601,7 +1583,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                break;
 
                        LayoutFile const * old_layout = buffer->params().baseClass();
-                       LayoutFile const * new_layout = &(BaseClassList::get()[argument]);
+                       LayoutFile const * new_layout = &(LayoutFileList::get()[argument]);
 
                        if (old_layout == new_layout)
                                // nothing to do
@@ -1622,7 +1604,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        Buffer * buffer = lyx_view_->buffer();
                        DocumentClass * oldClass = buffer->params().documentClassPtr();
                        LayoutFileIndex bc = buffer->params().baseClassID();
-                       BaseClassList::get().reset(bc);
+                       LayoutFileList::get().reset(bc);
                        buffer->params().makeDocumentClass();
                        updateLayout(oldClass, buffer);
                        updateFlags = Update::Force | Update::FitCursor;