mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
* src/Text3.cpp (doInsertInset):
- Improve the behaviour when inserting a collapsable inset over a multi-paragraph selection. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23511 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98b08ee76b
commit
ba956235d1
@ -281,11 +281,18 @@ bool doInsertInset(Cursor & cur, Text * text,
|
||||
// metrics might be invalid at this point (bug 4502)
|
||||
cur.bv().updateMetrics();
|
||||
lyx::dispatch(FuncRequest(LFUN_PASTE, "0"));
|
||||
// reset first par to default
|
||||
if (cur.lastpit() != 0 || cur.lastpos() != 0) {
|
||||
|
||||
if (cur.lastpit() == 0) {
|
||||
// reset first par to default
|
||||
Layout_ptr const layout =
|
||||
cur.buffer().params().getTextClass().defaultLayout();
|
||||
cur.text()->paragraphs().begin()->layout(layout);
|
||||
} else {
|
||||
// reset surrounding par to default
|
||||
docstring const layoutname =
|
||||
cur.buffer().params().getTextClass().defaultLayoutName();
|
||||
cur.leaveInset(*inset);
|
||||
text->setLayout(cur, layoutname);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -77,6 +77,9 @@ What's new
|
||||
|
||||
- When cutting a selection do not leave a dangling paragraph (bug 3995).
|
||||
|
||||
- Improve the behaviour when inserting a collapsable inset over a multi-
|
||||
paragraph selection.
|
||||
|
||||
|
||||
* DOCUMENTATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user