mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 13:40:39 +00:00
Use correct cursor when creating undo group
This affects where cursor will be after undo. In this case, we want obviously the 'old' cursor. Fixes bug #12874.
This commit is contained in:
parent
2195543188
commit
d27f309905
@ -2651,7 +2651,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
|
|||||||
// Put anchor at the same position.
|
// Put anchor at the same position.
|
||||||
cur.resetAnchor();
|
cur.resetAnchor();
|
||||||
|
|
||||||
cur.beginUndoGroup();
|
old.beginUndoGroup();
|
||||||
|
|
||||||
// Try to dispatch to an non-editable inset near this position
|
// Try to dispatch to an non-editable inset near this position
|
||||||
// via the temp cursor. If the inset wishes to change the real
|
// via the temp cursor. If the inset wishes to change the real
|
||||||
@ -2673,7 +2673,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
|
|||||||
cursor().fixIfBroken();
|
cursor().fixIfBroken();
|
||||||
}
|
}
|
||||||
|
|
||||||
cur.endUndoGroup();
|
old.endUndoGroup();
|
||||||
|
|
||||||
// Do we have a selection?
|
// Do we have a selection?
|
||||||
theSelection().haveSelection(cursor().selection());
|
theSelection().haveSelection(cursor().selection());
|
||||||
|
Loading…
Reference in New Issue
Block a user