diff --git a/src/frontends/qt4/QErrorList.C b/src/frontends/qt4/QErrorList.C index 9b254cf61a..061447ab65 100644 --- a/src/frontends/qt4/QErrorList.C +++ b/src/frontends/qt4/QErrorList.C @@ -57,9 +57,6 @@ void QErrorList::update_contents() for(; it != end; ++it) { dialog_->errorsLW->addItem(toqstr(it->error)); } - - dialog_->errorsLW->setCurrentRow(0); - select(dialog_->errorsLW->item(0)); } } // namespace frontend diff --git a/src/frontends/qt4/QErrorListDialog.C b/src/frontends/qt4/QErrorListDialog.C index 205d257e12..b7adf553b2 100644 --- a/src/frontends/qt4/QErrorListDialog.C +++ b/src/frontends/qt4/QErrorListDialog.C @@ -49,6 +49,15 @@ void QErrorListDialog::closeEvent(QCloseEvent * e) e->accept(); } + +void QErrorListDialog::showEvent(QShowEvent *e) +{ + errorsLW->setCurrentRow(0); + form_->select(errorsLW->item(0)); + e->accept(); +} + + } // namespace frontend } // namespace lyx diff --git a/src/frontends/qt4/QErrorListDialog.h b/src/frontends/qt4/QErrorListDialog.h index d4893e1f15..cf467009fc 100644 --- a/src/frontends/qt4/QErrorListDialog.h +++ b/src/frontends/qt4/QErrorListDialog.h @@ -29,10 +29,12 @@ class QErrorListDialog : public QDialog, public Ui::QErrorListUi { public: QErrorListDialog(QErrorList * form); ~QErrorListDialog(); + public Q_SLOTS: void select_adaptor(QListWidgetItem *); protected: - void closeEvent(QCloseEvent * e); + void closeEvent(QCloseEvent *); + void showEvent(QShowEvent *); private: QErrorList * form_; };