#include "frontends/alert.h"
-#include "support/lstrings.h"
+#include "support/convert.h"
#include "support/docstream.h"
#include "support/gettext.h"
-#include "support/convert.h"
+#include "support/lstrings.h"
using namespace std;
using namespace lyx::support;
InsetBibitem::~InsetBibitem()
{
- if (buffer_)
+ if (isBufferValid())
buffer_->invalidateBibinfoCache();
}
}
docstring old_key = params()["key"];
setParam("label", p["label"]);
- updateCommand(p["key"]);
- if (params()["key"] != old_key)
+ if (params()["key"] != old_key) {
+ updateCommand(p["key"]);
cur.bv().buffer().changeRefsIfUnique(old_key,
params()["key"], CITE_CODE);
+ }
buffer_->invalidateBibinfoCache();
break;
}