mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
aae301e9cd
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2405 a592a061-630c-0410-9148-cb99ea01b6c8
55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2001 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*
|
|
* \file ControlBibitem.C
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
*/
|
|
|
|
#include <algorithm>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include <config.h>
|
|
#include "ViewBase.h"
|
|
#include "ButtonControllerBase.h"
|
|
#include "ControlBibitem.h"
|
|
#include "Dialogs.h"
|
|
#include "LyXView.h"
|
|
#include "buffer.h"
|
|
#include "BufferView.h"
|
|
|
|
using SigC::slot;
|
|
|
|
ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
|
|
: ControlCommand(lv, d)
|
|
{
|
|
d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
|
|
}
|
|
|
|
|
|
void ControlBibitem::applyParamsToInset()
|
|
{
|
|
// FIXME:
|
|
// confirm, is this only necessary for FormBibTeX ???
|
|
if (params().getContents() != inset()->params().getContents())
|
|
lv_.view()->ChangeCitationsIfUnique(inset()->params().getContents(),
|
|
params().getContents());
|
|
|
|
inset()->setParams(params());
|
|
lv_.view()->updateInset(inset(), true);
|
|
|
|
// We need to do a redraw because the maximum
|
|
// InsetBibKey width could have changed
|
|
lv_.view()->redraw();
|
|
lv_.view()->fitCursor();
|
|
}
|