]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibitem.C
prefs/tabular MVC work
[lyx.git] / src / frontends / controllers / ControlBibitem.C
1 /**
2  * \file ControlBibitem.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #include <config.h>
13
14 #ifdef __GNUG__
15 #pragma implementation
16 #endif
17
18 #include "ControlBibitem.h"
19 #include "BufferView.h"
20
21
22 ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
23         : ControlCommand(lv, d)
24 {}
25
26
27 void ControlBibitem::applyParamsToInset()
28 {
29         // FIXME:
30         // confirm, is this only necessary for FormBibTeX ???
31         if (params().getContents() != inset()->params().getContents())
32                 bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
33                                                     params().getContents());
34
35         inset()->setParams(params());
36         bufferview()->updateInset(inset(), true);
37
38         // We need to do a redraw because the maximum
39         // InsetBibKey width could have changed
40 #warning please check you mean repaint() not update(),
41 #warning and whether the repaint() is needed at all
42         bufferview()->repaint();
43         bufferview()->fitCursor();
44 }