]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibitem.C
fix tooltips in toolbar
[lyx.git] / src / frontends / controllers / ControlBibitem.C
1 /* This file is part of
2  * ======================================================
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 2001 The LyX Team.
7  *
8  * ======================================================
9  *
10  * \file ControlBibitem.C
11  * \author John Levon, moz@compsoc.man.ac.uk
12  * \author Angus Leeming <a.leeming@ic.ac.uk>
13  */
14
15 #include <config.h>
16
17 #ifdef __GNUG__
18 #pragma implementation
19 #endif
20
21 #include "ControlBibitem.h"
22 #include "BufferView.h"
23
24
25 ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
26         : ControlCommand(lv, d)
27 {}
28
29
30 void ControlBibitem::applyParamsToInset()
31 {
32         // FIXME:
33         // confirm, is this only necessary for FormBibTeX ???
34         if (params().getContents() != inset()->params().getContents())
35                 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
36                                                     params().getContents());
37
38         inset()->setParams(params());
39         lv_.view()->updateInset(inset(), true);
40
41         // We need to do a redraw because the maximum
42         // InsetBibKey width could have changed
43 #warning please check you mean repaint() not update(),
44 #warning and whether the repaint() is needed at all
45         lv_.view()->repaint();
46         lv_.view()->fitCursor();
47 }