2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlBibtex.C
12 * \author John Levon, moz@compsoc.man.ac.uk
13 * \author Angus Leeming <a.leeming@ic.ac.uk>
19 #pragma implementation
23 #include "ControlBibtex.h"
30 ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
31 : ControlCommand(lv, d)
33 d_.showBibtex.connect(slot(this, &ControlBibtex::showInset));
36 void ControlBibtex::applyParamsToInset()
38 if (params().getContents() != inset()->params().getContents())
39 lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
40 params().getContents());
42 inset()->setParams(params());
43 lv_.view()->updateInset(inset(), true);
45 // We need to do a redraw because the maximum
46 // InsetBibKey width could have changed
48 lv_.view()->fitCursor(lv_.view()->getLyXText());
52 void ControlBibtex::applyParamsNoInset()