]> git.lyx.org Git - features.git/commitdiff
(finishing patch -- question was restored, but there were still problems)
authorTommaso Cucinotta <tommaso@lyx.org>
Sat, 13 Nov 2010 12:02:04 +0000 (12:02 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Sat, 13 Nov 2010 12:02:04 +0000 (12:02 +0000)
Restore the wrap-around question when no more hits found while searching with Advanced Search.
The dispatched() flag is used currently in FindAndReplace.cpp in order to discriminate between
match found and not found and, in the latter case, pop-up the wrap-around question dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36279 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 488a998810f1f37b4abdba2be7d49274d7eb448e..9f61d39825471c45b86e434261ee41cc5556b257 100644 (file)
@@ -1539,10 +1539,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                FindAndReplaceOptions opt;
                istringstream iss(to_utf8(cmd.argument()));
                iss >> opt;
-               if (findAdv(this, opt))
+               if (findAdv(this, opt)) {
                        dr.screenUpdate(Update::Force | Update::FitCursor);
-               else
+                       cur.dispatched();
+                       dispatched = true;
+               } else {
+                       cur.undispatched();
                        dispatched = false;
+               }
                break;
        }