Repair behavior of citation dialog after all the recent changes in src/frontends/. Previously, there had been a virtual initialiseParams() method in QCitation which overrode the corresponding method in ControlCitation. But now there is no "local" controller, and so intialiseParams() overrode nothing and so never got called.

I've also made some minor changes here to GuiSelectionManager, changing updateView(), which is now used as a commonly overridden method of GuiDialog, back to update(). The method does not serve the same purpose here.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20281 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2007-09-15 01:53:26 +00:00
parent dbe7b13f65
commit 6f0703e707
4 changed files with 5 additions and 15 deletions

View File

@ -147,6 +147,7 @@ void GuiCitationDialog::hideView()
void GuiCitationDialog::showView()
{
init();
findLE->clear();
availableLV->setFocus();
QDialog::show();
@ -191,6 +192,7 @@ void GuiCitationDialog::on_restorePB_clicked()
void GuiCitationDialog::updateView()
{
init();
fillFields();
fillEntries();
updateDialog();
@ -351,7 +353,7 @@ bool GuiCitationDialog::isSelected(const QModelIndex & idx)
void GuiCitationDialog::setButtons()
{
selectionManager->updateView();
selectionManager->update();
int const srows = selectedLV->model()->rowCount();
applyPB->setEnabled(srows > 0);
okPB->setEnabled(srows > 0);
@ -487,15 +489,6 @@ QString GuiCitationDialog::textAfter()
}
bool GuiCitationDialog::initialiseParams(std::string const & data)
{
if (!controller().initialiseParams(data))
return false;
init();
return true;
}
void GuiCitationDialog::init()
{
// Make the list of all available bibliography keys

View File

@ -97,9 +97,6 @@ private:
GuiSelectionManager * selectionManager;
///
bool initialiseParams(std::string const & data);
///
void init();

View File

@ -67,7 +67,7 @@ selectedLV->installEventFilter(this);
}
void GuiSelectionManager::updateView()
void GuiSelectionManager::update()
{
int const arows = availableLV->model()->rowCount();
QModelIndexList const availSels =

View File

@ -50,7 +50,7 @@ public:
/// Sets the state of the various push buttons, depending upon the
/// state of the widgets. (E.g., "delete" is enabled only if the
/// selection is non-empty.)
virtual void updateView();
void update();
/// Not strictly a matter of focus, which may be elsewhere, but
/// whether selectedLV is `more focused' than availableLV. Intended