From 7726d33a3258836be163ecefd976201093bee2a9 Mon Sep 17 00:00:00 2001 From: dockes Date: Thu, 15 Nov 2007 18:44:51 +0000 Subject: [PATCH] comment --- src/qtgui/preview_w.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp index 3eaa1a5a..081df739 100644 --- a/src/qtgui/preview_w.cpp +++ b/src/qtgui/preview_w.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.30 2007-11-15 18:34:49 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.31 2007-11-15 18:44:51 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -82,6 +82,16 @@ using std::pair; #define QTEXTPARAGRAPH Q3TextParagraph #define QTEXTSTRINGCHAR Q3TextStringChar #endif +// QTextEdit's scrollToAnchor() is supposed to make the anchor visible, but +// actually, it only moves to the top of the paragraph containing the anchor. +// As we only have one paragraph, this doesnt' help a lot (qt3 and qt4) +// +// So, had to write a different function, inspired from what +// qtextedit::find() does, instead. This ones actually moves the +// cursor, which is probably not necessary, but does what we need. +// +// Problem is, it uses the sem-private qrichtext_p.h, which is not +// even installed under qt4. We use a local copy, which is not nice. void QTextEditFixed::moveToAnchor(const QString& name) { if (name.isEmpty())