X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiApplication.cpp;h=4656e63a69f5855ce8593e043a099075055a19ab;hb=28896d1bddcfcd358c863603334c0a013fb601ea;hp=641431a91fe2c48b2e593e8e65d028250aedffd5;hpb=c5799b7019b1e5f797bdd382218c9005a13a8ec4;p=lyx.git diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 641431a91f..4656e63a69 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1617,6 +1617,10 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) BufferView * bv = current_view_->currentBufferView(); LASSERT(bv, /**/); + // Avoid a screen redraw in the middle of a dispatch operation just + // because a warning or an error was displayed. + current_view_->setBusy(true); + // Let the current BufferView dispatch its own actions. bv->dispatch(cmd, dr); if (dr.dispatched()) @@ -1647,11 +1651,16 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) bv->cursor().dispatch(cmd); // notify insets we just left + // FIXME: move this code to Cursor::dispatch if (bv->cursor() != old) { + old.beginUndoGroup(); old.fixIfBroken(); bool badcursor = notifyCursorLeavesOrEnters(old, bv->cursor()); - if (badcursor) + if (badcursor) { bv->cursor().fixIfBroken(); + bv->fixInlineCompletionPos(); + } + old.endUndoGroup(); } // update completion. We do it here and not in @@ -1668,6 +1677,8 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) } dr = bv->cursor().result(); + + current_view_->setBusy(false); } // if we executed a mutating lfun, mark the buffer as dirty