]> git.lyx.org Git - features.git/commitdiff
* QErrorList::update_contents(): avoid touching the dialog here.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 25 Jan 2007 10:21:02 +0000 (10:21 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 25 Jan 2007 10:21:02 +0000 (10:21 +0000)
* 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
src/frontends/qt4/QErrorListDialog.C
src/frontends/qt4/QErrorListDialog.h

index 9b254cf61abfdc91d223019c35a1ad664186d587..061447ab654cef30a649df552b5be99d26bfa32c 100644 (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
index 205d257e127ad456d9df60a8ef0c3ccac3489ebe..b7adf553b2420a04584a5ff4f5ccbd1839fc909d 100644 (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
 
index d4893e1f1583c179c02c0752049cf278edd9967b..cf467009fc06ba4c27b461f466d436328be38b05 100644 (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_;
 };