From: Jürgen Spitzmüller Date: Sun, 5 Oct 2008 09:51:28 +0000 (+0000) Subject: fix bug 3434. X-Git-Tag: 1.6.10~3175 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a0e6594ced9bc5931a1f1b2f130e0a6cb0e2e8fa;p=lyx.git fix bug 3434. * InsetText.cpp (getStatus): - correctly disable layout and paragraph settings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26739 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 142d21b612..ab480f8c13 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -25,6 +25,7 @@ #include "DispatchResult.h" #include "ErrorList.h" #include "FuncRequest.h" +#include "FuncStatus.h" #include "InsetList.h" #include "Intl.h" #include "Lexer.h" @@ -250,7 +251,21 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const { - return text_.getStatus(cur, cmd, status); + switch (cmd.action) { + case LFUN_LAYOUT: + status.setEnabled(!forcePlainLayout()); + return true; + + case LFUN_LAYOUT_PARAGRAPH: + case LFUN_PARAGRAPH_PARAMS: + case LFUN_PARAGRAPH_PARAMS_APPLY: + case LFUN_PARAGRAPH_SPACING: + case LFUN_PARAGRAPH_UPDATE: + status.setEnabled(allowParagraphCustomization()); + return true; + default: + return text_.getStatus(cur, cmd, status); + } }