mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Make Cursor::disp_ private as it should be.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34144 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ebb830ba9b
commit
8156884090
@ -2838,10 +2838,10 @@ void BufferView::setInlineCompletion(Cursor & cur, DocIterator const & pos,
|
||||
|
||||
// set update flags
|
||||
if (changed) {
|
||||
if (singlePar && !(cur.disp_.update() & Update::Force))
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
if (singlePar && !(cur.result().update() & Update::Force))
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
else
|
||||
cur.updateFlags(cur.disp_.update() | Update::Force);
|
||||
cur.updateFlags(cur.result().update() | Update::Force);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -291,14 +291,14 @@ public:
|
||||
/// the anchor position
|
||||
DocIterator anchor_;
|
||||
|
||||
///
|
||||
mutable DispatchResult disp_;
|
||||
///
|
||||
DocIterator const & beforeDispatchCursor() const { return beforeDispatchCursor_; }
|
||||
///
|
||||
void saveBeforeDispatchPosXY();
|
||||
|
||||
private:
|
||||
///
|
||||
mutable DispatchResult disp_;
|
||||
/**
|
||||
* The target x position of the cursor. This is used for when
|
||||
* we have text like :
|
||||
|
@ -2020,8 +2020,8 @@ bool Text::insertCompletion(Cursor & cur, docstring const & s, bool /*finished*/
|
||||
LASSERT(cur.bv().cursor() == cur, /**/);
|
||||
cur.insert(s);
|
||||
cur.bv().cursor() = cur;
|
||||
if (!(cur.disp_.update() & Update::Force))
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
if (!(cur.result().update() & Update::Force))
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -316,8 +316,8 @@ void GuiCompleter::updateVisibility(Cursor & cur, bool start, bool keep, bool cu
|
||||
inline_timer_.start(int(lyxrc.completion_inline_delay * 1000));
|
||||
else {
|
||||
// no inline completion, hence a metrics update is needed
|
||||
if (!(cur.disp_.update() & Update::Force))
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
if (!(cur.result().update() & Update::Force))
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
}
|
||||
|
||||
// update prefix if any completion is possible
|
||||
@ -338,8 +338,8 @@ void GuiCompleter::updateVisibility(bool start, bool keep)
|
||||
|
||||
updateVisibility(cur, start, keep);
|
||||
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -603,8 +603,8 @@ void GuiCompleter::showPopup()
|
||||
showPopup(cur);
|
||||
|
||||
// redraw if needed
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -616,8 +616,8 @@ void GuiCompleter::showInline()
|
||||
showInline(cur);
|
||||
|
||||
// redraw if needed
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -629,8 +629,8 @@ void GuiCompleter::hidePopup()
|
||||
hidePopup(cur);
|
||||
|
||||
// redraw if needed
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -642,8 +642,8 @@ void GuiCompleter::hideInline()
|
||||
hideInline(cur);
|
||||
|
||||
// redraw if needed
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -721,8 +721,8 @@ void GuiCompleter::tab()
|
||||
popup_timer_.start(0);
|
||||
|
||||
// redraw if needed
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -887,8 +887,8 @@ void GuiCompleter::popupActivated(const QString & completion)
|
||||
hidePopup(cur);
|
||||
hideInline(cur);
|
||||
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
|
||||
@ -903,8 +903,8 @@ void GuiCompleter::popupHighlighted(const QString & completion)
|
||||
if (inlineVisible())
|
||||
updateInline(cur, completion);
|
||||
|
||||
if (cur.disp_.update())
|
||||
gui_->bufferView().processUpdateFlags(cur.disp_.update());
|
||||
if (cur.result().update())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().update());
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -704,13 +704,13 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
||||
// must be a subscript...
|
||||
old.recordUndoInset();
|
||||
removeScript(false);
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
return true;
|
||||
} else if (cell(1).empty()) {
|
||||
// must be a superscript...
|
||||
old.recordUndoInset();
|
||||
removeScript(true);
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -740,7 +740,7 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
||||
insetCur.cell().insert(insetCur.pos(), ar);
|
||||
|
||||
// redraw
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -641,7 +641,7 @@ bool MathMacro::notifyCursorLeaves(Cursor const & old, Cursor & cur)
|
||||
inset_cursor.cell().erase(inset_cursor.pos());
|
||||
inset_cursor.cell().insert(inset_cursor.pos(),
|
||||
createInsetMath(unfolded_name, cur.buffer()));
|
||||
cur.updateFlags(cur.disp_.update() | Update::SinglePar);
|
||||
cur.updateFlags(cur.result().update() | Update::SinglePar);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user