]> git.lyx.org Git - lyx.git/commitdiff
Fix Undo with search-string-set
authorDaniel Ramoeller <d.lyx@web.de>
Thu, 18 Feb 2021 07:05:15 +0000 (08:05 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 18 Feb 2021 12:09:30 +0000 (13:09 +0100)
Makes it possible to use the find combobox's internal undo feature to undo a set search string.

src/frontends/qt/GuiSearch.cpp

index 11cda70e00ad74a0b5c858515ef23203efbcacef..323ac8affd2a4e6f29d495a4f66ef138c59146e4 100644 (file)
@@ -322,11 +322,8 @@ void GuiSearchWidget::findBufferChanged()
        docstring search = theClipboard().getFindBuffer();
        if (!search.empty()) {
                LYXERR(Debug::CLIPBOARD, "from findbuffer: " << search);
-#if QT_VERSION > 0x050000
-               findCO->setCurrentText(toqstr(search));
-#else
-               findCO->setEditText(toqstr(search));
-#endif
+               findCO->lineEdit()->selectAll();
+               findCO->lineEdit()->insert(toqstr(search));
        }
 }