mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
fix bug 4301:
BufferView::moveToPosition(..) failed for every position inside an inset because buffer_->text() was used instead of cursor_.text() to set the current font. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
508f44d8be
commit
5275a25cf4
@ -546,7 +546,7 @@ boost::tuple<pit_type, pos_type, int> BufferView::moveToPosition(pit_type bottom
|
||||
break;
|
||||
}
|
||||
setCursor(dit);
|
||||
buffer_->text().setCurrentFont(cursor_);
|
||||
cursor_.text()->setCurrentFont(cursor_);
|
||||
// Note: return bottom (document) level pit.
|
||||
return boost::make_tuple(cursor_.bottom().pit(), cursor_.bottom().pos(), top_id);
|
||||
}
|
||||
@ -562,7 +562,7 @@ boost::tuple<pit_type, pos_type, int> BufferView::moveToPosition(pit_type bottom
|
||||
it.pit() = bottom_pit;
|
||||
it.pos() = min(bottom_pos, it.paragraph().size());
|
||||
setCursor(it);
|
||||
buffer_->text().setCurrentFont(cursor_);
|
||||
cursor_.text()->setCurrentFont(cursor_);
|
||||
return boost::make_tuple(it.pit(), it.pos(),
|
||||
it.paragraph().id());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user