]> git.lyx.org Git - lyx.git/commitdiff
Fix potential crash.
authorEnrico Forestieri <forenr@lyx.org>
Thu, 22 May 2014 09:41:23 +0000 (11:41 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 22 May 2014 09:41:23 +0000 (11:41 +0200)
Use the lfun for breaking the paragraph here, such that the metrics
are updated before the call to the next dispatch.

src/Text3.cpp

index 2c2cba47298cbb23f6ca0e4e997fa2e635d3f217..9fc8d6f8cc7bdc1dd74cc7dc13a79a65674b398b 100644 (file)
@@ -1084,7 +1084,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                                DocumentClass const & tc = bv->buffer().params().documentClass();
                                lyx::dispatch(FuncRequest(LFUN_LAYOUT, tc.plainLayout().name()));
                                lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));
-                               breakParagraph(cur, true);
+                               lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse"));
                                lyx::dispatch(FuncRequest(LFUN_LAYOUT, layout));
                        } else {
                                lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak"));