2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlBibitem.C
12 * \author John Levon, moz@compsoc.man.ac.uk
13 * \author Angus Leeming <a.leeming@ic.ac.uk>
19 #pragma implementation
24 #include "ButtonControllerBase.h"
25 #include "ControlBibitem.h"
32 ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
33 : ControlCommand(lv, d)
35 d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
38 void ControlBibitem::applyParamsToInset()
41 // confirm, is this only necessary for FormBibTeX ???
42 if (params().getContents() != inset()->params().getContents())
43 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
44 params().getContents());
46 inset()->setParams(params());
47 lv_.view()->updateInset(inset(), true);
49 // We need to do a redraw because the maximum
50 // InsetBibKey width could have changed
52 lv_.view()->fitCursor(lv_.view()->getLyXText());