- if (lv_->buffer()->isReadonly())
- return;
-
- params.setContents(fl_get_input(dialog_->database));
- params.setOptions(fl_get_input(dialog_->style));
-
- if (inset_ != 0) {
- // Only update if contents have changed
- if (params != inset_->params()) {
- 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(lv_->view()->getLyXText());
- }
- } else
- lyxerr[Debug::GUI] << "Editing non-existent bibtex inset !" << endl;
+ controller().params().setContents(fl_get_input(dialog_->database));
+ controller().params().setOptions(fl_get_input(dialog_->style));