]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibitem.C
include sys/time.h
[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
15 #include "ControlBibitem.h"
16 #include "BufferView.h"
17
18
19 ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
20         : ControlCommand(lv, d)
21 {}
22
23
24 void ControlBibitem::applyParamsToInset()
25 {
26         // FIXME:
27         // confirm, is this only necessary for FormBibTeX ???
28         if (params().getContents() != inset()->params().getContents())
29                 bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
30                                                     params().getContents());
31
32         inset()->setParams(params());
33         bufferview()->updateInset(inset(), true);
34
35         // We need to do a redraw because the maximum
36         // InsetBibKey width could have changed
37 #warning please check you mean repaint() not update(),
38 #warning and whether the repaint() is needed at all
39         bufferview()->repaint();
40         bufferview()->fitCursor();
41 }