mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
DispatchResult::update() ==> DispatchResult::screenUpdate()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35631 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
35eb1a2405
commit
6a80ce62ca
@ -2045,7 +2045,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
docstring const str = branch_name + ' ' + from_ascii(x11hexname);
|
docstring const str = branch_name + ' ' + from_ascii(x11hexname);
|
||||||
lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
|
lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
|
||||||
dr.setError(false);
|
dr.setError(false);
|
||||||
dr.update(Update::Force);
|
dr.screenUpdate(Update::Force);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!msg.empty())
|
if (!msg.empty())
|
||||||
@ -2072,7 +2072,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
} else {
|
} else {
|
||||||
branch->setSelected(func.action() == LFUN_BRANCH_ACTIVATE);
|
branch->setSelected(func.action() == LFUN_BRANCH_ACTIVATE);
|
||||||
dr.setError(false);
|
dr.setError(false);
|
||||||
dr.update(Update::Force);
|
dr.screenUpdate(Update::Force);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2109,7 +2109,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
dr.update(Update::Force);
|
dr.screenUpdate(Update::Force);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1207,7 +1207,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// We are most certainly here because of a change in the document
|
// We are most certainly here because of a change in the document
|
||||||
// It is then better to make sure that all dialogs are in sync with
|
// It is then better to make sure that all dialogs are in sync with
|
||||||
// current document settings.
|
// current document settings.
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1219,7 +1219,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
buffer_.params().clearLayoutModules();
|
buffer_.params().clearLayoutModules();
|
||||||
buffer_.params().makeDocumentClass();
|
buffer_.params().makeDocumentClass();
|
||||||
updateDocumentClass(oldClass);
|
updateDocumentClass(oldClass);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1237,7 +1237,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
buffer_.params().addLayoutModule(argument);
|
buffer_.params().addLayoutModule(argument);
|
||||||
buffer_.params().makeDocumentClass();
|
buffer_.params().makeDocumentClass();
|
||||||
updateDocumentClass(oldClass);
|
updateDocumentClass(oldClass);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1269,7 +1269,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
buffer_.params().setBaseClass(argument);
|
buffer_.params().setBaseClass(argument);
|
||||||
buffer_.params().makeDocumentClass();
|
buffer_.params().makeDocumentClass();
|
||||||
updateDocumentClass(oldDocClass);
|
updateDocumentClass(oldDocClass);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1295,7 +1295,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
buffer_.params().setBaseClass(bc);
|
buffer_.params().setBaseClass(bc);
|
||||||
buffer_.params().makeDocumentClass();
|
buffer_.params().makeDocumentClass();
|
||||||
updateDocumentClass(oldClass);
|
updateDocumentClass(oldClass);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1306,7 +1306,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
if (!cur.textUndo())
|
if (!cur.textUndo())
|
||||||
dr.setMessage(_("No further undo information"));
|
dr.setMessage(_("No further undo information"));
|
||||||
else
|
else
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1316,7 +1316,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
if (!cur.textRedo())
|
if (!cur.textRedo())
|
||||||
dr.setMessage(_("No further redo information"));
|
dr.setMessage(_("No further redo information"));
|
||||||
else
|
else
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1365,7 +1365,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// Set the cursor
|
// Set the cursor
|
||||||
dit.pos() = pos;
|
dit.pos() = pos;
|
||||||
setCursor(dit);
|
setCursor(dit);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
} else {
|
} else {
|
||||||
// Switch to other buffer view and resend cmd
|
// Switch to other buffer view and resend cmd
|
||||||
lyx::dispatch(FuncRequest(
|
lyx::dispatch(FuncRequest(
|
||||||
@ -1419,18 +1419,18 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
case LFUN_CHANGE_NEXT:
|
case LFUN_CHANGE_NEXT:
|
||||||
findNextChange(this);
|
findNextChange(this);
|
||||||
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_CHANGE_PREVIOUS:
|
case LFUN_CHANGE_PREVIOUS:
|
||||||
findPreviousChange(this);
|
findPreviousChange(this);
|
||||||
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_CHANGES_MERGE:
|
case LFUN_CHANGES_MERGE:
|
||||||
if (findNextChange(this) || findPreviousChange(this)) {
|
if (findNextChange(this) || findPreviousChange(this)) {
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
showDialog("changes");
|
showDialog("changes");
|
||||||
}
|
}
|
||||||
@ -1444,7 +1444,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// accept everything in a single step to support atomic undo
|
// accept everything in a single step to support atomic undo
|
||||||
buffer_.text().acceptOrRejectChanges(cur, Text::ACCEPT);
|
buffer_.text().acceptOrRejectChanges(cur, Text::ACCEPT);
|
||||||
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1457,7 +1457,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// Note: reject does not work recursively; the user may have to repeat the operation
|
// Note: reject does not work recursively; the user may have to repeat the operation
|
||||||
buffer_.text().acceptOrRejectChanges(cur, Text::REJECT);
|
buffer_.text().acceptOrRejectChanges(cur, Text::REJECT);
|
||||||
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1663,7 +1663,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
bool update = in_texted && cur.bv().checkDepm(cur, old);
|
bool update = in_texted && cur.bv().checkDepm(cur, old);
|
||||||
cur.finishUndo();
|
cur.finishUndo();
|
||||||
if (update) {
|
if (update) {
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1687,7 +1687,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
y = getPos(cur).y_;
|
y = getPos(cur).y_;
|
||||||
|
|
||||||
cur.finishUndo();
|
cur.finishUndo();
|
||||||
dr.update(Update::SinglePar | Update::FitCursor);
|
dr.screenUpdate(Update::SinglePar | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1704,7 +1704,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
y = getPos(cur).y_;
|
y = getPos(cur).y_;
|
||||||
|
|
||||||
cur.finishUndo();
|
cur.finishUndo();
|
||||||
dr.update(Update::SinglePar | Update::FitCursor);
|
dr.screenUpdate(Update::SinglePar | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1747,7 +1747,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
cur.endUndoGroup();
|
cur.endUndoGroup();
|
||||||
cur = savecur;
|
cur = savecur;
|
||||||
cur.fixIfBroken();
|
cur.fixIfBroken();
|
||||||
dr.update(Update::Force);
|
dr.screenUpdate(Update::Force);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
|
|
||||||
if (iterations >= max_iter) {
|
if (iterations >= max_iter) {
|
||||||
@ -1853,7 +1853,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// single par update would be good enough, but it has no way
|
// single par update would be good enough, but it has no way
|
||||||
// to tell us that at the moment.
|
// to tell us that at the moment.
|
||||||
inset->dispatch(cur, fr);
|
inset->dispatch(cur, fr);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2061,8 +2061,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
|
|||||||
theSelection().haveSelection(cursor().selection());
|
theSelection().haveSelection(cursor().selection());
|
||||||
|
|
||||||
// If the command has been dispatched,
|
// If the command has been dispatched,
|
||||||
if (cur.result().dispatched() || cur.result().update())
|
if (cur.result().dispatched() || cur.result().screenUpdate())
|
||||||
processUpdateFlags(cur.result().update());
|
processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2878,10 +2878,10 @@ void BufferView::setInlineCompletion(Cursor & cur, DocIterator const & pos,
|
|||||||
|
|
||||||
// set update flags
|
// set update flags
|
||||||
if (changed) {
|
if (changed) {
|
||||||
if (singlePar && !(cur.result().update() & Update::Force))
|
if (singlePar && !(cur.result().screenUpdate() & Update::Force))
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
else
|
else
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::Force);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::Force);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
|||||||
if (lyxaction.funcHasFlag(cmd.action(), LyXAction::AtPoint)
|
if (lyxaction.funcHasFlag(cmd.action(), LyXAction::AtPoint)
|
||||||
&& nextInset()) {
|
&& nextInset()) {
|
||||||
disp_.dispatched(true);
|
disp_.dispatched(true);
|
||||||
disp_.update(Update::FitCursor | Update::Force);
|
disp_.screenUpdate(Update::FitCursor | Update::Force);
|
||||||
FuncRequest tmpcmd = cmd;
|
FuncRequest tmpcmd = cmd;
|
||||||
LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
|
LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
|
||||||
<< cmd0 << endl << *this);
|
<< cmd0 << endl << *this);
|
||||||
@ -362,7 +362,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
|||||||
// The common case is 'LFUN handled, need update', so make the
|
// The common case is 'LFUN handled, need update', so make the
|
||||||
// LFUN handler's life easier by assuming this as default value.
|
// LFUN handler's life easier by assuming this as default value.
|
||||||
// The handler can reset the update and val flags if necessary.
|
// The handler can reset the update and val flags if necessary.
|
||||||
disp_.update(Update::FitCursor | Update::Force);
|
disp_.screenUpdate(Update::FitCursor | Update::Force);
|
||||||
disp_.dispatched(true);
|
disp_.dispatched(true);
|
||||||
inset().dispatch(*this, cmd);
|
inset().dispatch(*this, cmd);
|
||||||
if (disp_.dispatched())
|
if (disp_.dispatched())
|
||||||
@ -383,7 +383,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
|||||||
safe.pos() = safe.lastpos();
|
safe.pos() = safe.lastpos();
|
||||||
}
|
}
|
||||||
operator=(safe);
|
operator=(safe);
|
||||||
disp_.update(Update::None);
|
disp_.screenUpdate(Update::None);
|
||||||
disp_.dispatched(false);
|
disp_.dispatched(false);
|
||||||
} else {
|
} else {
|
||||||
// restore the previous one because nested Cursor::dispatch calls
|
// restore the previous one because nested Cursor::dispatch calls
|
||||||
@ -2122,7 +2122,7 @@ void Cursor::dispatched()
|
|||||||
|
|
||||||
void Cursor::screenUpdateFlags(Update::flags f)
|
void Cursor::screenUpdateFlags(Update::flags f)
|
||||||
{
|
{
|
||||||
disp_.update(f);
|
disp_.screenUpdate(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2146,7 +2146,7 @@ bool Cursor::needBufferUpdate() const
|
|||||||
|
|
||||||
void Cursor::noScreenUpdate()
|
void Cursor::noScreenUpdate()
|
||||||
{
|
{
|
||||||
disp_.update(Update::None);
|
disp_.screenUpdate(Update::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ public:
|
|||||||
///
|
///
|
||||||
void setMessage(docstring m) { message_ = m; }
|
void setMessage(docstring m) { message_ = m; }
|
||||||
///
|
///
|
||||||
Update::flags update() const { return update_; }
|
Update::flags screenUpdate() const { return update_; }
|
||||||
///
|
///
|
||||||
void update(Update::flags f) { update_ = f; }
|
void screenUpdate(Update::flags f) { update_ = f; }
|
||||||
/// Does the buffer need updating?
|
/// Does the buffer need updating?
|
||||||
bool needBufferUpdate() const { return need_buf_update_; }
|
bool needBufferUpdate() const { return need_buf_update_; }
|
||||||
/// Force the buffer to be updated
|
/// Force the buffer to be updated
|
||||||
|
@ -2036,8 +2036,8 @@ bool Text::insertCompletion(Cursor & cur, docstring const & s, bool /*finished*/
|
|||||||
LASSERT(cur.bv().cursor() == cur, /**/);
|
LASSERT(cur.bv().cursor() == cur, /**/);
|
||||||
cur.insert(s);
|
cur.insert(s);
|
||||||
cur.bv().cursor() = cur;
|
cur.bv().cursor() = cur;
|
||||||
if (!(cur.result().update() & Update::Force))
|
if (!(cur.result().screenUpdate() & Update::Force))
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2133,7 +2133,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
// for now only Text::erase() and Text::backspace() do that.
|
// for now only Text::erase() and Text::backspace() do that.
|
||||||
// The plan is to verify all the LFUNs and then to remove this
|
// The plan is to verify all the LFUNs and then to remove this
|
||||||
// singleParUpdate boolean altogether.
|
// singleParUpdate boolean altogether.
|
||||||
if (cur.result().update() & Update::Force) {
|
if (cur.result().screenUpdate() & Update::Force) {
|
||||||
singleParUpdate = false;
|
singleParUpdate = false;
|
||||||
needsUpdate = true;
|
needsUpdate = true;
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1092,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
|
|||||||
DispatchResult dr;
|
DispatchResult dr;
|
||||||
// redraw the screen at the end (first of the two drawing steps).
|
// redraw the screen at the end (first of the two drawing steps).
|
||||||
//This is done unless explicitly requested otherwise
|
//This is done unless explicitly requested otherwise
|
||||||
dr.update(Update::FitCursor);
|
dr.screenUpdate(Update::FitCursor);
|
||||||
dispatch(cmd, dr);
|
dispatch(cmd, dr);
|
||||||
|
|
||||||
if (!current_view_)
|
if (!current_view_)
|
||||||
@ -1108,7 +1108,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
|
|||||||
// also initializes the position cache for all insets in
|
// also initializes the position cache for all insets in
|
||||||
// (at least partially) visible top-level paragraphs.
|
// (at least partially) visible top-level paragraphs.
|
||||||
// We will redraw the screen only if needed.
|
// We will redraw the screen only if needed.
|
||||||
bv->processUpdateFlags(dr.update());
|
bv->processUpdateFlags(dr.screenUpdate());
|
||||||
|
|
||||||
// Do we have a selection?
|
// Do we have a selection?
|
||||||
theSelection().haveSelection(bv->cursor().selection());
|
theSelection().haveSelection(bv->cursor().selection());
|
||||||
@ -1237,7 +1237,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
dr.setMessage(flag.message());
|
dr.setMessage(flag.message());
|
||||||
dr.setError(true);
|
dr.setError(true);
|
||||||
dr.dispatched(false);
|
dr.dispatched(false);
|
||||||
dr.update(Update::None);
|
dr.screenUpdate(Update::None);
|
||||||
dr.clearBufferUpdate();
|
dr.clearBufferUpdate();
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
@ -1564,7 +1564,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
case LFUN_BOOKMARK_GOTO:
|
case LFUN_BOOKMARK_GOTO:
|
||||||
// go to bookmark, open unopened file and switch to buffer if necessary
|
// go to bookmark, open unopened file and switch to buffer if necessary
|
||||||
gotoBookmark(convert<unsigned int>(to_utf8(cmd.argument())), true, true);
|
gotoBookmark(convert<unsigned int>(to_utf8(cmd.argument())), true, true);
|
||||||
dr.update(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_BOOKMARK_CLEAR:
|
case LFUN_BOOKMARK_CLEAR:
|
||||||
|
@ -313,8 +313,8 @@ void GuiCompleter::updateVisibility(Cursor & cur, bool start, bool keep, bool cu
|
|||||||
inline_timer_.start(int(lyxrc.completion_inline_delay * 1000));
|
inline_timer_.start(int(lyxrc.completion_inline_delay * 1000));
|
||||||
else {
|
else {
|
||||||
// no inline completion, hence a metrics update is needed
|
// no inline completion, hence a metrics update is needed
|
||||||
if (!(cur.result().update() & Update::Force))
|
if (!(cur.result().screenUpdate() & Update::Force))
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update prefix if any completion is possible
|
// update prefix if any completion is possible
|
||||||
@ -335,8 +335,8 @@ void GuiCompleter::updateVisibility(bool start, bool keep)
|
|||||||
|
|
||||||
updateVisibility(cur, start, keep);
|
updateVisibility(cur, start, keep);
|
||||||
|
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -600,8 +600,8 @@ void GuiCompleter::showPopup()
|
|||||||
showPopup(cur);
|
showPopup(cur);
|
||||||
|
|
||||||
// redraw if needed
|
// redraw if needed
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -613,8 +613,8 @@ void GuiCompleter::showInline()
|
|||||||
showInline(cur);
|
showInline(cur);
|
||||||
|
|
||||||
// redraw if needed
|
// redraw if needed
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -626,8 +626,8 @@ void GuiCompleter::hidePopup()
|
|||||||
hidePopup(cur);
|
hidePopup(cur);
|
||||||
|
|
||||||
// redraw if needed
|
// redraw if needed
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -639,8 +639,8 @@ void GuiCompleter::hideInline()
|
|||||||
hideInline(cur);
|
hideInline(cur);
|
||||||
|
|
||||||
// redraw if needed
|
// redraw if needed
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -718,8 +718,8 @@ void GuiCompleter::tab()
|
|||||||
popup_timer_.start(0);
|
popup_timer_.start(0);
|
||||||
|
|
||||||
// redraw if needed
|
// redraw if needed
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -884,8 +884,8 @@ void GuiCompleter::popupActivated(const QString & completion)
|
|||||||
hidePopup(cur);
|
hidePopup(cur);
|
||||||
hideInline(cur);
|
hideInline(cur);
|
||||||
|
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -900,8 +900,8 @@ void GuiCompleter::popupHighlighted(const QString & completion)
|
|||||||
if (inlineVisible())
|
if (inlineVisible())
|
||||||
updateInline(cur, completion);
|
updateInline(cur, completion);
|
||||||
|
|
||||||
if (cur.result().update())
|
if (cur.result().screenUpdate())
|
||||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
|
@ -2831,7 +2831,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
{
|
{
|
||||||
BufferView * bv = currentBufferView();
|
BufferView * bv = currentBufferView();
|
||||||
// By default we won't need any update.
|
// By default we won't need any update.
|
||||||
dr.update(Update::None);
|
dr.screenUpdate(Update::None);
|
||||||
// assume cmd will be dispatched
|
// assume cmd will be dispatched
|
||||||
dr.dispatched(true);
|
dr.dispatched(true);
|
||||||
|
|
||||||
|
@ -1454,7 +1454,7 @@ void InsetMathNest::lfunMousePress(Cursor & cur, FuncRequest & cmd)
|
|||||||
// position if needed
|
// position if needed
|
||||||
// cur.result().update(): don't overwrite previously set flags.
|
// cur.result().update(): don't overwrite previously set flags.
|
||||||
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor
|
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor
|
||||||
| cur.result().update());
|
| cur.result().screenUpdate());
|
||||||
} else if (cmd.button() == mouse_button::button2) {
|
} else if (cmd.button() == mouse_button::button2) {
|
||||||
if (cap::selection()) {
|
if (cap::selection()) {
|
||||||
// See comment in Text::dispatch why we do this
|
// See comment in Text::dispatch why we do this
|
||||||
|
@ -704,13 +704,13 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
|||||||
// must be a subscript...
|
// must be a subscript...
|
||||||
old.recordUndoInset();
|
old.recordUndoInset();
|
||||||
removeScript(false);
|
removeScript(false);
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
return true;
|
return true;
|
||||||
} else if (cell(1).empty()) {
|
} else if (cell(1).empty()) {
|
||||||
// must be a superscript...
|
// must be a superscript...
|
||||||
old.recordUndoInset();
|
old.recordUndoInset();
|
||||||
removeScript(true);
|
removeScript(true);
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -740,7 +740,7 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
|||||||
insetCur.cell().insert(insetCur.pos(), ar);
|
insetCur.cell().insert(insetCur.pos(), ar);
|
||||||
|
|
||||||
// redraw
|
// redraw
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ bool MathMacro::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
|||||||
inset_cursor.cell().erase(inset_cursor.pos());
|
inset_cursor.cell().erase(inset_cursor.pos());
|
||||||
inset_cursor.cell().insert(inset_cursor.pos(),
|
inset_cursor.cell().insert(inset_cursor.pos(),
|
||||||
createInsetMath(unfolded_name, cur.buffer()));
|
createInsetMath(unfolded_name, cur.buffer()));
|
||||||
cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
|
cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user