mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Set selection.cursor always on a ButtonPress event in insettext (fixes the
crashes on opening collapsable inset put into one row). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3228 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6774c17368
commit
e8f7285df3
@ -1,3 +1,7 @@
|
||||
2001-12-17 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* tabular.C (AppendColumn): applied John's fix
|
||||
|
||||
2001-12-15 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* BufferView.h:
|
||||
@ -8,15 +12,11 @@
|
||||
* Makefile.am:
|
||||
* box.h: new start of class for above
|
||||
|
||||
2001-12-15 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* lyxfunc.C: ignore space-only minibuffer dispatches.
|
||||
Show the command name when it doesn't exist
|
||||
|
||||
* minibuffer.C: don't add empty lines to the history
|
||||
|
||||
2001-12-15 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* minibuffer.C: add a space on dropdown completion
|
||||
|
||||
2001-12-14 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
@ -1,5 +1,9 @@
|
||||
2001-12-17 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insettext.C (insetButtonPress): set the selection cursor!
|
||||
(insetButtonPress): clear the selection (and set with that the
|
||||
selection.cursor) if we only hit an inset!
|
||||
|
||||
* insetert.C (read): removed piece of compatibility code only needed
|
||||
for 1.2.0.
|
||||
|
||||
|
@ -969,6 +969,9 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
clear = true;
|
||||
}
|
||||
lt->setCursorFromCoordinates(bv, x-drawTextXOffset, y + insetAscent);
|
||||
// set the selection cursor!
|
||||
lt->selection.cursor = lt->cursor;
|
||||
lt->cursor.x_fix(lt->cursor.x());
|
||||
if (lt->selection.set()) {
|
||||
lt->clearSelection();
|
||||
updateLocal(bv, FULL, false);
|
||||
@ -989,6 +992,8 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
}
|
||||
if (clear)
|
||||
lt = 0;
|
||||
} else {
|
||||
lt->clearSelection();
|
||||
}
|
||||
showInsetCursor(bv);
|
||||
no_selection = false;
|
||||
@ -1030,7 +1035,7 @@ void InsetText::insetMotionNotify(BufferView * bv, int x, int y, int state)
|
||||
return;
|
||||
if (the_locking_inset) {
|
||||
the_locking_inset->insetMotionNotify(bv, x - inset_x,
|
||||
y - inset_y,state);
|
||||
y - inset_y,state);
|
||||
return;
|
||||
}
|
||||
bool clear = false;
|
||||
@ -1039,7 +1044,10 @@ void InsetText::insetMotionNotify(BufferView * bv, int x, int y, int state)
|
||||
clear = true;
|
||||
}
|
||||
hideInsetCursor(bv);
|
||||
LyXCursor cur = lt->cursor;
|
||||
lt->setCursorFromCoordinates(bv, x - drawTextXOffset, y + insetAscent);
|
||||
if (cur == lt->cursor)
|
||||
return;
|
||||
lt->setSelection(bv);
|
||||
if (lt->toggle_cursor.par() != lt->toggle_end_cursor.par() ||
|
||||
lt->toggle_cursor.pos() != lt->toggle_end_cursor.pos())
|
||||
|
Loading…
Reference in New Issue
Block a user