From 6de44e53f579283dd44ea32e268a5b27167afd61 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 27 Aug 2007 09:31:38 +0000 Subject: [PATCH] Fix crash when inserting float. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19828 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text3.cpp | 6 +++++- status.15x | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 9046667fa4..17692579e1 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1277,7 +1277,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) // reposition the cursor to the caption cur.pit() = cap_pit; cur.pos() = 0; - cur.dispatch(FuncRequest(LFUN_CAPTION_INSERT)); + // FIXME: This Text/Cursor dispatch handling is a mess! + // We cannot use Cursor::dispatch here it needs access to up to + // date metrics. + cur.text()->dispatch(cur, FuncRequest(LFUN_CAPTION_INSERT)); + cur.updateFlags(Update::Force); // FIXME: When leaving the Float (or Wrap) inset we should // delete any empty paragraph left above or below the // caption. diff --git a/status.15x b/status.15x index 60d1ad4bcc..15c636a497 100644 --- a/status.15x +++ b/status.15x @@ -52,6 +52,8 @@ What's new - Add "Save all on log-out or cancel" feature (Bug 1656). +- Fix crash when inserting float. + ** Bug fixes: *************