From 62053efc7008b2e756e3390edaf4e1d77624ef54 Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Sun, 10 Jan 2010 23:54:45 +0000 Subject: [PATCH] Added hourglass cursor while searching. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32958 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/FindAndReplace.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/FindAndReplace.cpp b/src/frontends/qt4/FindAndReplace.cpp index dc409ba2cb..68b3387e97 100644 --- a/src/frontends/qt4/FindAndReplace.cpp +++ b/src/frontends/qt4/FindAndReplace.cpp @@ -258,8 +258,11 @@ static bool next_prev_buffer(Buffer * & buf, FindAndReplaceOptions const & opt) --it; } FileName const & fname = FileName(*it); - if (!theBufferList().exists(fname)) + if (!theBufferList().exists(fname)) { + guiApp->currentView()->setBusy(false); guiApp->currentView()->loadDocument(fname, false); + guiApp->currentView()->setBusy(true); + } buf = theBufferList().getBuffer(fname); break; } @@ -310,8 +313,11 @@ void FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions & opt) { vector const & v = allManualsFiles(); if (std::find(v.begin(), v.end(), buf->absFileName()) == v.end()) { FileName const & fname = FileName(*v.begin()); - if (!theBufferList().exists(fname)) + if (!theBufferList().exists(fname)) { + guiApp->currentView()->setBusy(false); guiApp->currentView()->loadDocument(fname, false); + guiApp->currentView()->setBusy(true); + } buf = theBufferList().getBuffer(fname); lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH, buf->absFileName())); @@ -423,7 +429,9 @@ void FindAndReplaceWidget::findAndReplace( << ", scope=" << scope); FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards, expandmacros, ignoreformat, regexp, replaceString, keep_case, scope); + view_.setBusy(true); findAndReplaceScope(opt); + view_.setBusy(false); } -- 2.39.2