mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Fix undo after breaking a nested paragraph
We have to take into account that Buffer::updateBuffer can modify the document. Fix bug #11292.
This commit is contained in:
parent
c40d23deac
commit
57feb0fed0
@ -1412,11 +1412,13 @@ DispatchResult const & GuiApplication::dispatch(FuncRequest const & cmd)
|
|||||||
// This handles undo groups automagically
|
// This handles undo groups automagically
|
||||||
UndoGroupHelper ugh(buffer);
|
UndoGroupHelper ugh(buffer);
|
||||||
dispatch(cmd, dr);
|
dispatch(cmd, dr);
|
||||||
|
// redraw the screen at the end (first of the two drawing steps).
|
||||||
|
// This is done unless explicitly requested otherwise.
|
||||||
|
// This code is kept inside the undo group because updateBuffer
|
||||||
|
// can create undo actions (see #11292)
|
||||||
|
updateCurrentView(cmd, dr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// redraw the screen at the end (first of the two drawing steps).
|
|
||||||
// This is done unless explicitly requested otherwise
|
|
||||||
updateCurrentView(cmd, dr);
|
|
||||||
d->dispatch_result_ = dr;
|
d->dispatch_result_ = dr;
|
||||||
return d->dispatch_result_;
|
return d->dispatch_result_;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user