2001-03-15 13:37:04 +00:00
|
|
|
/* This file is part of
|
2002-03-21 21:21:28 +00:00
|
|
|
* ======================================================
|
2001-03-15 13:37:04 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-03-20 10:14:03 +00:00
|
|
|
* Copyright 2001 The LyX Team.
|
2001-03-15 13:37:04 +00:00
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* \file ControlBibitem.C
|
2001-03-20 10:14:03 +00:00
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
2002-08-15 16:02:22 +00:00
|
|
|
* \author Angus Leeming <leeming@lyx.org>
|
2001-03-15 13:37:04 +00:00
|
|
|
*/
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include <config.h>
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include "ControlBibitem.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "BufferView.h"
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
|
|
|
|
: ControlCommand(lv, d)
|
2002-06-18 15:44:30 +00:00
|
|
|
{}
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-06-27 14:10:35 +00:00
|
|
|
|
2001-03-23 17:09:34 +00:00
|
|
|
void ControlBibitem::applyParamsToInset()
|
2001-03-15 13:37:04 +00:00
|
|
|
{
|
2001-03-23 17:09:34 +00:00
|
|
|
// FIXME:
|
|
|
|
// confirm, is this only necessary for FormBibTeX ???
|
|
|
|
if (params().getContents() != inset()->params().getContents())
|
2002-08-12 20:17:41 +00:00
|
|
|
bufferview()->ChangeCitationsIfUnique(inset()->params().getContents(),
|
2001-03-23 17:09:34 +00:00
|
|
|
params().getContents());
|
|
|
|
|
|
|
|
inset()->setParams(params());
|
2002-08-12 20:17:41 +00:00
|
|
|
bufferview()->updateInset(inset(), true);
|
2001-03-23 17:09:34 +00:00
|
|
|
|
|
|
|
// We need to do a redraw because the maximum
|
|
|
|
// InsetBibKey width could have changed
|
2002-06-21 02:22:13 +00:00
|
|
|
#warning please check you mean repaint() not update(),
|
|
|
|
#warning and whether the repaint() is needed at all
|
2002-08-12 20:17:41 +00:00
|
|
|
bufferview()->repaint();
|
|
|
|
bufferview()->fitCursor();
|
2001-03-15 13:37:04 +00:00
|
|
|
}
|