Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Abdelrazak Younes wrote:
Jean-Marc Lasgouttes wrote:
Now, if you have a better idea to fix the problem, I am all ears.
I am not sure I understand the problem but, IIUC, it's the job of
the frontend to remember the position of the last selected error
item. In your patch this is kind-of done by the controller.
Abdelrazak> I mean something like the attached (not tested and against
Abdelrazak> trunk/qt4).
Everytime one selects an error in the list box, this selects the
corresponding text in LyX window. And everytime an update is done, the
dialog is rebuilt and the first element is selected. This is _highly_
disruptive. Selecting the last pos (been there, done that) is not very
different, it is just that you select a different part of the
document.
OK, now I understand the problem, sorry for my autism ;-). Then the fix
is even simpler for this particular dialog: just transfer the code in
update_contents() to buil_dialog(). In any case, the error list will be
automatically updated if a new error list is generated. Or am I missing
something again?
Abdel.
Index: QErrorList.C
===================================================================
--- QErrorList.C (revision 14623)
+++ QErrorList.C (working copy)
@@ -43,11 +43,7 @@
int const item = dialog_->errorsLW->row(wi);
controller().goTo(item);
dialog_->descriptionTB->setPlainText(toqstr(controller().errorList()[item].description));
-}
-
-void QErrorList::update_contents()
-{
setTitle(controller().name());
dialog_->errorsLW->clear();
dialog_->descriptionTB->setPlainText(QString());
@@ -62,5 +58,10 @@
select(dialog_->errorsLW->item(0));
}
+
+void QErrorList::update_contents()
+{
+}
+
} // namespace frontend
} // namespace lyx