* src/Text3.cpp:

- disallow non-Note notes inside commands (sections etc.)
	  This fixes bug 4180 partially (the change is still possible via the dialog).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23919 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-03-24 13:24:44 +00:00
parent 090e6911d2
commit 7255a701e8
2 changed files with 7 additions and 1 deletions

View File

@ -1788,7 +1788,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
code = Inset::ERT_CODE;
break;
case LFUN_LISTING_INSERT:
code = Inset::LISTINGS_CODE;
code = Inset::LISTINGS_CODE;
break;
case LFUN_FOOTNOTE_INSERT:
code = Inset::FOOT_CODE;
@ -1822,6 +1822,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
break;
case LFUN_NOTE_INSERT:
code = Inset::NOTE_CODE;
// in commands (sections etc., only Notes are allowed)
enable = (cmd.argument().empty() || cmd.getArg(0) == "Note" ||
!cur.paragraph().layout()->isCommand());
break;
case LFUN_CHARSTYLE_INSERT:
code = Inset::CHARSTYLE_CODE;

View File

@ -118,6 +118,9 @@ What's new
- Fix wrong focusing of buttons in search dialog (bug 4194).
- Disallow some Note variants in places where they would result in LaTeX
errors (part of bug 4180).
* DOCUMENTATION