From 2a1da61470270cce497a19e000815f94190dcb7a Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 25 Jan 2007 10:21:02 +0000 Subject: [PATCH] * QErrorList::update_contents(): avoid touching the dialog here. * QErrorListDialog::showEvent(): new method. Set the error on the first item. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16848 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/QErrorList.C | 3 --- src/frontends/qt4/QErrorListDialog.C | 9 +++++++++ src/frontends/qt4/QErrorListDialog.h | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) 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_; };