Jürgen Spitzmüller wrote:
Maybe. FWIW, here's the solution where the map is put into the controller
(although I'm a bit reluctant at putting things in the controller where
there's obviously qt4 to blame).
Well, it's not as simple as that, you are asking the dialog to remember
the cursor position for each buffer. If you want 1.4 behaviour, what
about this simpler patch instead? It might be a bit heavy to compare the
whole string each time. Alternatively as BufferParam is already known at
QDocument level, you can maintain a map of cursor position in the dialog
itself: map<BufferParam*, QCursor *>.
Abdel.
Index: QDocument.cpp
===================================================================
--- QDocument.cpp (revision 18144)
+++ QDocument.cpp (working copy)
@@ -1022,7 +1022,8 @@
// preamble
QString preamble = toqstr(params.preamble);
- preambleModule->preambleTE->document()->setPlainText(preamble);
+ if (preamble != preambleModule->preambleTE->document()->toPlainText())
+ preambleModule->preambleTE->document()->setPlainText(preamble);
// biblio
biblioModule->citeDefaultRB->setChecked(