mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix potential crash.
Use the lfun for breaking the paragraph here, such that the metrics are updated before the call to the next dispatch.
This commit is contained in:
parent
a17710e499
commit
2c613d5686
@ -1084,7 +1084,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
DocumentClass const & tc = bv->buffer().params().documentClass();
|
DocumentClass const & tc = bv->buffer().params().documentClass();
|
||||||
lyx::dispatch(FuncRequest(LFUN_LAYOUT, tc.plainLayout().name()));
|
lyx::dispatch(FuncRequest(LFUN_LAYOUT, tc.plainLayout().name()));
|
||||||
lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));
|
lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));
|
||||||
breakParagraph(cur, true);
|
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse"));
|
||||||
lyx::dispatch(FuncRequest(LFUN_LAYOUT, layout));
|
lyx::dispatch(FuncRequest(LFUN_LAYOUT, layout));
|
||||||
} else {
|
} else {
|
||||||
lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));
|
lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));
|
||||||
|
Loading…
Reference in New Issue
Block a user