]> git.lyx.org Git - features.git/commitdiff
Repair behavior of citation dialog after all the recent changes in src/frontends...
authorRichard Heck <rgheck@comcast.net>
Sat, 15 Sep 2007 01:53:26 +0000 (01:53 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 15 Sep 2007 01:53:26 +0000 (01:53 +0000)
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

src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiCitation.h
src/frontends/qt4/GuiSelectionManager.cpp
src/frontends/qt4/GuiSelectionManager.h

index 4f2e5cc62587e64157664267141e59347203e96d..cbb72edabb1da6bbc01ecbbc22af8f9a56b6a986 100644 (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
index 95a0158dce6905526e18b75bac6c7be8eff2ab78..583d432b9caf598ad1ddecb97c328b5f3c700f69 100644 (file)
@@ -97,9 +97,6 @@ private:
        
        GuiSelectionManager * selectionManager;
 
-       ///
-       bool initialiseParams(std::string const & data);
-
        ///
        void init();
 
index 130d3f85c484a63bdf03f3108020b73f565c8731..2333d3cc8fa9c54b33a69faf0bc5897debe9f32b 100644 (file)
@@ -67,7 +67,7 @@ selectedLV->installEventFilter(this);
 }
 
 
-void GuiSelectionManager::updateView()
+void GuiSelectionManager::update()
 {
 int const arows = availableLV->model()->rowCount();
 QModelIndexList const availSels = 
index a9d1f72bf86e1011d4c4e52dba1c4ac2a8ac5ccb..ac4671be456db74d4224904b3b1df86b6625ab54 100644 (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