mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
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:
parent
dbe7b13f65
commit
6f0703e707
@ -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
|
||||
|
@ -97,9 +97,6 @@ private:
|
||||
|
||||
GuiSelectionManager * selectionManager;
|
||||
|
||||
///
|
||||
bool initialiseParams(std::string const & data);
|
||||
|
||||
///
|
||||
void init();
|
||||
|
||||
|
@ -67,7 +67,7 @@ selectedLV->installEventFilter(this);
|
||||
}
|
||||
|
||||
|
||||
void GuiSelectionManager::updateView()
|
||||
void GuiSelectionManager::update()
|
||||
{
|
||||
int const arows = availableLV->model()->rowCount();
|
||||
QModelIndexList const availSels =
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user