mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #8342: Endless undo group messages
Fix thinko in Undo::endUndoGroup. Do not reset undo groups in Undo::clean The underlying problem remains: the various VC functions should not always reload the buffer or at least should use the parameter clearUndo=false.
This commit is contained in:
parent
51c380440b
commit
538570a1e5
10
src/Undo.cpp
10
src/Undo.cpp
@ -249,8 +249,10 @@ void Undo::clear()
|
||||
d->undostack_.clear();
|
||||
d->redostack_.clear();
|
||||
d->undo_finished_ = true;
|
||||
d->group_id = 0;
|
||||
d->group_level = 0;
|
||||
// We used to do that, but I believe it is better to keep
|
||||
// groups (only used in Buffer::reload for now (JMarc)
|
||||
//d->group_id = 0;
|
||||
//d->group_level = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -511,8 +513,10 @@ void Undo::beginUndoGroup()
|
||||
|
||||
void Undo::endUndoGroup()
|
||||
{
|
||||
if (d->group_level == 0)
|
||||
if (d->group_level == 0) {
|
||||
LYXERR0("There is no undo group to end here");
|
||||
return;
|
||||
}
|
||||
--d->group_level;
|
||||
if (d->group_level == 0) {
|
||||
// real end of the group
|
||||
|
Loading…
Reference in New Issue
Block a user