From ce7c45bb437c44dae15f96148cb9b793ab0b895c Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 31 Jan 2007 10:54:36 +0000 Subject: [PATCH] Fix 3188, update the labels at each Caption insertion. http://bugzilla.lyx.org/show_bug.cgi?id=3188 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16965 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text3.C | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/text3.C b/src/text3.C index 3973d08ccc..7d4b85524c 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1129,6 +1129,15 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) case LFUN_THEOREM_INSERT: #endif case LFUN_CAPTION_INSERT: + // Open the inset, and move the current selection + // inside it. + doInsertInset(cur, this, cmd, true, true); + cur.posRight(); + updateLabels(*bv->buffer()); + // FIXME: We should insert two empty paragraphs before and + // after the caption so that the user can go up or down in + // order to insert a figure or a table. + break; case LFUN_NOTE_INSERT: case LFUN_CHARSTYLE_INSERT: case LFUN_BOX_INSERT: @@ -1160,7 +1169,6 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) doInsertInset(cur, this, cmd, true, true); cur.posRight(); cur.dispatch(FuncRequest(LFUN_CAPTION_INSERT)); - updateLabels(cur.buffer()); break; case LFUN_INDEX_INSERT: