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