http://bugzilla.lyx.org/show_bug.cgi?id=3999
The attached patch (against branch) finally fixes this issue. I don't see an alternative to implementing update_contents(). Objections? Jürgen
Index: src/frontends/qt4/QSearch.h =================================================================== --- src/frontends/qt4/QSearch.h (Revision 21284) +++ src/frontends/qt4/QSearch.h (Arbeitskopie) @@ -30,7 +30,6 @@ public: QSearchDialog(QSearch * form); - virtual void show(); protected Q_SLOTS: void findChanged(); void findClicked(); @@ -59,7 +58,7 @@ /// Apply changes virtual void apply() {} /// update - virtual void update_contents() {} + virtual void update_contents(); /// build the dialog virtual void build_dialog(); Index: src/frontends/qt4/QSearch.cpp =================================================================== --- src/frontends/qt4/QSearch.cpp (Revision 21284) +++ src/frontends/qt4/QSearch.cpp (Arbeitskopie) @@ -50,23 +50,16 @@ setupUi(this); connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose())); - connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked())); - connect(replacePB, SIGNAL(clicked()), this, SLOT(replaceClicked())); - connect(replaceallPB, SIGNAL(clicked()), this, SLOT(replaceallClicked())); - connect(findCO, SIGNAL(editTextChanged(const QString &)), + connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked())); + connect(replacePB, SIGNAL(clicked()), this, SLOT(replaceClicked())); + connect(replaceallPB, SIGNAL(clicked()), this, SLOT(replaceallClicked())); + connect(findCO, SIGNAL(editTextChanged(const QString &)), this, SLOT(findChanged())); setFocusProxy(findCO); } -void QSearchDialog::show() -{ - QDialog::show(); - findCO->lineEdit()->setSelection(0, findCO->lineEdit()->text().length()); -} - - void QSearchDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -96,7 +89,6 @@ wordsCB->isChecked(), backwardsCB->isChecked()); uniqueInsert(findCO, findCO->currentText()); - findCO->lineEdit()->setSelection(0, findCO->lineEdit()->text().length()); } @@ -155,6 +147,12 @@ } +void QSearch::update_contents() +{ + dialog_->findCO->lineEdit()->selectAll(); +} + + void QSearch::find(docstring const & str, bool casesens, bool words, bool backwards) {