* 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
This commit is contained in:
Abdelrazak Younes 2007-01-25 10:21:02 +00:00
parent db4499f4b1
commit 2a1da61470
3 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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_;
};