X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfind.cpp;h=2ddedcb4818bf21d37ae1c406fd7de9326990cd5;hb=9ec80456feed688440360e0a493cbf537c4fe5f9;hp=0ba2acec9010a4d194352901cc12b9143416b047;hpb=9be6a425df7e304356afee2998c962c91ea47a1f;p=lyx.git diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 0ba2acec90..2ddedcb481 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -57,13 +57,8 @@ //#define ResultsDebug #define USE_QT_FOR_SEARCH #if defined(USE_QT_FOR_SEARCH) - #include // sets QT_VERSION - #if (QT_VERSION >= 0x050000) - #include - #define QTSEARCH 1 - #else - #define QTSEARCH 0 - #endif + #include + #define QTSEARCH 1 #else #define QTSEARCH 0 #endif @@ -338,7 +333,7 @@ bool findOne(BufferView * bv, docstring const & searchstr, if (match_len > 0) bv->putSelectionAt(cur, match_len, !forward); - else if (onlysel) { + else if (onlysel && bv->cursor().selection()) { docstring q = _("The search string was not found within the selection.\n" "Continue search outside?"); int search_answer = frontend::Alert::prompt(_("Search outside selection?"),