From: Abdelrazak Younes Date: Mon, 27 Aug 2007 09:03:18 +0000 (+0000) Subject: Lyx crashed after inserting, deleting and inserting float object. X-Git-Tag: 1.6.10~8684 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8750d351da9ebe3bc5ed731eb24095020bcc453d;p=lyx.git Lyx crashed after inserting, deleting and inserting float object. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19827 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Text3.cpp b/src/Text3.cpp index b2b0c4b807..68f822173a 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1271,7 +1271,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.