mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Do not change the object that is returned by result(), this will have no effect because result() returned a copy. From now, it just returns a const & to prevent this from happening again.
see r31969. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34143 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fe0a508b83
commit
ebb830ba9b
@ -335,13 +335,13 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
||||
// Is this a function that acts on inset at point?
|
||||
if (lyxaction.funcHasFlag(cmd.action(), LyXAction::AtPoint)
|
||||
&& nextInset()) {
|
||||
result().dispatched(true);
|
||||
result().update(Update::FitCursor | Update::Force);
|
||||
disp_.dispatched(true);
|
||||
disp_.update(Update::FitCursor | Update::Force);
|
||||
FuncRequest tmpcmd = cmd;
|
||||
LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
|
||||
<< cmd0 << endl << *this);
|
||||
nextInset()->dispatch(*this, tmpcmd);
|
||||
if (result().dispatched()) {
|
||||
if (disp_.dispatched()) {
|
||||
buffer()->undo().endUndoGroup();
|
||||
return;
|
||||
}
|
||||
@ -391,7 +391,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
||||
}
|
||||
|
||||
|
||||
DispatchResult Cursor::result() const
|
||||
DispatchResult const & Cursor::result() const
|
||||
{
|
||||
return disp_;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
/// dispatch from innermost inset upwards
|
||||
void dispatch(FuncRequest const & cmd);
|
||||
/// get the resut of the last dispatch
|
||||
DispatchResult result() const;
|
||||
DispatchResult const & result() const;
|
||||
/// add a new cursor slice
|
||||
void push(Inset & inset);
|
||||
/// add a new cursor slice, place cursor at front (move backwards)
|
||||
|
Loading…
Reference in New Issue
Block a user