2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
11 * \file ControlBibitem.C
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
18 #pragma implementation
22 #include "ControlBibitem.h"
25 #include "BufferView.h"
29 ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
30 : ControlCommand(lv, d)
32 d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
35 void ControlBibitem::apply()
39 if (inset_ && params() != inset_->params()) {
41 // confirm, is this only necessary for FormBibTeX ???
42 if (params().getContents() != inset_->params().getContents())
43 lv_.view()->ChangeCitationsIfUnique(
44 inset_->params().getContents(),
45 params().getContents());
47 inset_->setParams(params());
48 lv_.view()->updateInset(inset_, true);
50 // We need to do a redraw because the maximum
51 // InsetBibKey width could have changed
53 lv_.view()->fitCursor(lv_.view()->getLyXText());