mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-03 22:14:04 +00:00
parent
bd206ff5f5
commit
5160fa1043
@ -1567,16 +1567,29 @@ void InsetMathNest::lfunMousePress(Cursor & cur, FuncRequest & cmd)
|
|||||||
void InsetMathNest::lfunMouseMotion(Cursor & cur, FuncRequest & cmd)
|
void InsetMathNest::lfunMouseMotion(Cursor & cur, FuncRequest & cmd)
|
||||||
{
|
{
|
||||||
// only select with button 1
|
// only select with button 1
|
||||||
if (cmd.button() == mouse_button::button1) {
|
if (cmd.button() != mouse_button::button1)
|
||||||
Cursor & bvcur = cur.bv().cursor();
|
return;
|
||||||
if (bvcur.realAnchor().hasPart(cur)) {
|
|
||||||
//lyxerr << "## lfunMouseMotion: cursor: " << cur << endl;
|
Cursor & bvcur = cur.bv().cursor();
|
||||||
bvcur.setCursor(cur);
|
|
||||||
bvcur.setSelection(true);
|
// ignore motions deeper nested than the real anchor
|
||||||
//lyxerr << "MOTION " << bvcur << endl;
|
if (!bvcur.realAnchor().hasPart(cur)) {
|
||||||
} else
|
cur.undispatched();
|
||||||
cur.undispatched();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CursorSlice old = bvcur.top();
|
||||||
|
|
||||||
|
// We continue with our existing selection or start a new one, so don't
|
||||||
|
// reset the anchor.
|
||||||
|
bvcur.setCursor(cur);
|
||||||
|
// Did we actually move?
|
||||||
|
if (cur.top() == old)
|
||||||
|
// We didn't move one iota, so no need to change selection status
|
||||||
|
// or update the screen.
|
||||||
|
cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
|
||||||
|
else
|
||||||
|
bvcur.setSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,6 +101,8 @@ What's new
|
|||||||
|
|
||||||
- Fix select-by-doubleclick in mathed (bug 8829).
|
- Fix select-by-doubleclick in mathed (bug 8829).
|
||||||
|
|
||||||
|
- Make selection by mouse drag more reliable in mathed (bug 9074).
|
||||||
|
|
||||||
- Fix undo with many individual changes (e.g. with replace all)
|
- Fix undo with many individual changes (e.g. with replace all)
|
||||||
(bug #7079).
|
(bug #7079).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user