From 14d9845a294f9e41338690ec4fdf97eaabdf2811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 6 Jun 2005 13:11:30 +0000 Subject: [PATCH] Disable LFUN_GOTO_NOTE when it does not make sense git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10004 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 7 ++++++- src/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 8753da7fbe..f0ea8745c5 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -972,7 +972,6 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd) case LFUN_FONT_STATE: case LFUN_INSERT_LABEL: case LFUN_BOOKMARK_SAVE: - case LFUN_LABEL_GOTO: case LFUN_GOTO_PARAGRAPH: case LFUN_GOTOERROR: case LFUN_GOTONOTE: @@ -987,6 +986,12 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd) flag.enabled(true); break; + case LFUN_LABEL_GOTO: { + flag.enabled(!cmd.argument.empty() + || getInsetByCode(cursor_, InsetBase::REF_CODE)); + break; + } + case LFUN_BOOKMARK_GOTO: flag.enabled(isSavedPosition(convert(cmd.argument))); break; diff --git a/src/ChangeLog b/src/ChangeLog index 3907b72139..a7f6265ee8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-06 Jürgen Spitzmüller + + * BufferView_pimpl.C (getStatus): enable LFUN_GOTO_NOTE only + when it actually makes sense. + 2005-06-06 Martin Vermeer * BufferView_pimpl.C: revert to showCursor in connection with