From 292dea23150e129f1fb9bb35be9617c0479e9749 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 6 Jun 2005 08:30:20 +0000 Subject: [PATCH] minor bibitem tweaks git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9998 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 7 +++++++ src/text.C | 3 ++- src/text3.C | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4b6ef263f9..0bc6d26e46 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-06-06 Jürgen Spitzmüller + + * text.C (redoParagraph): move cursor right after a bibitem + has been inserted. + + * text3.C: disable LFUN_BIBITEM_INSERT outside Bibliography. + 2005-06-02 Jean-Marc Lasgouttes * buffer_funcs.C (bufferErrors): fix computation of the end of an diff --git a/src/text.C b/src/text.C index ca069b6635..3d17a2eea4 100644 --- a/src/text.C +++ b/src/text.C @@ -1657,7 +1657,7 @@ bool LyXText::redoParagraph(pit_type const pit) // Add bibitem insets if necessary if (par.layout()->labeltype == LABEL_BIBLIO) { bool hasbibitem(false); - if (!par.insetlist.empty() + if (!par.insetlist.empty() // Insist on it being in pos 0 && par.getChar(0) == Paragraph::META_INSET) { InsetBase * inset = par.insetlist.begin()->inset; @@ -1668,6 +1668,7 @@ bool LyXText::redoParagraph(pit_type const pit) InsetBibitem * inset(new InsetBibitem(InsetCommandParams("bibitem"))); par.insertInset(0, static_cast(inset)); + bv()->cursor().posRight(); } } diff --git a/src/text3.C b/src/text3.C index e4d9060598..4f99c9cee6 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1567,6 +1567,10 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, flag.setOnOff(cur.paragraph().params().startOfAppendix()); return true; + case LFUN_INSERT_BIBITEM: + enable = (cur.paragraph().layout()->labeltype == LABEL_BIBLIO); + break; + #if 0 // the functions which insert insets InsetBase::Code code = InsetBase::NO_CODE; @@ -1831,7 +1835,6 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd, case LFUN_INSERT_LABEL: case LFUN_INSERT_NOTE: case LFUN_INSERT_CHARSTYLE: - case LFUN_INSERT_BIBITEM: case LFUN_INSET_FLOAT: case LFUN_INSET_FOOTNOTE: case LFUN_INSET_MARGINAL: -- 2.39.2