mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
* text.C (setCursorFromCoordinates):
* text2.C (setCursorIntern): add an assertion. * BufferView_pimpl.C (scrollDocView): reset cursor before setting it from coordinates (bug 2830). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15004 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
77fd733217
commit
759849aa42
@ -419,10 +419,12 @@ void BufferView::Pimpl::setCursorFromScrollbar()
|
||||
|
||||
switch (st) {
|
||||
case bv_funcs::CUR_ABOVE:
|
||||
cur.reset(buffer_->inset());
|
||||
t.setCursorFromCoordinates(cur, 0, first);
|
||||
cur.clearSelection();
|
||||
break;
|
||||
case bv_funcs::CUR_BELOW:
|
||||
cur.reset(buffer_->inset());
|
||||
t.setCursorFromCoordinates(cur, 0, last);
|
||||
cur.clearSelection();
|
||||
break;
|
||||
|
@ -2531,6 +2531,7 @@ pos_type LyXText::x2pos(pit_type pit, int row, int x) const
|
||||
// sets cursor only within this LyXText
|
||||
bool LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
|
||||
{
|
||||
BOOST_ASSERT(this == cur.text());
|
||||
pit_type pit = getPitNearY(y);
|
||||
int yy = theCoords.get(this, pit).y_ - pars_[pit].ascent();
|
||||
lyxerr[Debug::DEBUG]
|
||||
|
@ -719,6 +719,7 @@ void LyXText::setCursor(CursorSlice & cur, pit_type par, pos_type pos)
|
||||
void LyXText::setCursorIntern(LCursor & cur,
|
||||
pit_type par, pos_type pos, bool setfont, bool boundary)
|
||||
{
|
||||
BOOST_ASSERT(this == cur.text());
|
||||
cur.boundary(boundary);
|
||||
setCursor(cur.top(), par, pos);
|
||||
cur.setTargetX();
|
||||
|
Loading…
Reference in New Issue
Block a user