+ if (selected_model_.rowCount()) {
+ selectedLV->blockSignals(true);
+ selectedLV->setFocus();
+ QModelIndex idx = selected_model_.index(0, 0);
+ selectedLV->selectionModel()->select(idx,
+ QItemSelectionModel::ClearAndSelect);
+ selectedLV->blockSignals(false);
+
+ // set the style combo appropriately
+ string const & command = params_.getCmdName();
+ vector<CiteStyle> const & styles = citeStyles_;
+ CitationStyle const cs = citationStyleFromString(command);
+
+ vector<CiteStyle>::const_iterator cit =
+ std::find(styles.begin(), styles.end(), cs.style);
+ if (cit != styles.end()) {
+ int const i = int(cit - styles.begin());
+ // the necessary update will be performed later
+ citationStyleCO->blockSignals(true);
+ citationStyleCO->setCurrentIndex(i);
+ citationStyleCO->blockSignals(false);
+ }
+ } else
+ availableLV->setFocus();
+ fillFields(bi);
+ fillEntries(bi);
+ updateControls(bi);