]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlBibitem.C
John's character.C patch (bug fix).
[lyx.git] / src / frontends / controllers / ControlBibitem.C
index 3ca711a592e9f9df8b386aa4856943fee9e1082d..2f57feb3872fb067583947fe0a3381f282ba44c2 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* This file is part of
  * ====================================================== 
  *
 #endif
 
 #include <config.h>
+#include "ViewBase.h"
+#include "ButtonControllerBase.h"
 #include "ControlBibitem.h"
 #include "Dialogs.h"
 #include "LyXView.h"
+#include "buffer.h"
 #include "BufferView.h"
 
 using SigC::slot;
@@ -33,24 +35,20 @@ ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
        d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
 }
 
-void ControlBibitem::apply()
+
+void ControlBibitem::applyParamsToInset()
 {
-       view().apply();
-
-       if (inset_ && params() != inset_->params()) {
-               // FIXME:
-               // confirm, is this only necessary for FormBibTeX ???
-               if (params().getContents() != inset_->params().getContents())
-                       lv_.view()->ChangeCitationsIfUnique(
-                               inset_->params().getContents(),
-                               params().getContents());
-
-               inset_->setParams(params());
-               lv_.view()->updateInset(inset_, true);
-
-               // We need to do a redraw because the maximum
-               // InsetBibKey width could have changed
-               lv_.view()->redraw();
-               lv_.view()->fitCursor(lv_.view()->getLyXText());
-       }
+       // FIXME:
+       // confirm, is this only necessary for FormBibTeX ???
+       if (params().getContents() != inset()->params().getContents())
+               lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
+                                                   params().getContents());
+
+       inset()->setParams(params());
+       lv_.view()->updateInset(inset(), true);
+
+       // We need to do a redraw because the maximum
+       // InsetBibKey width could have changed
+       lv_.view()->redraw();
+       lv_.view()->fitCursor();
 }