mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
* disable some invalid insets in description items (covers bug 5937).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29584 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6537f7aca0
commit
74784942ed
@ -2071,8 +2071,11 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case LFUN_DIALOG_SHOW_NEW_INSET:
|
case LFUN_DIALOG_SHOW_NEW_INSET:
|
||||||
if (cmd.argument() == "bibitem")
|
if (cmd.argument() == "bibitem")
|
||||||
code = BIBITEM_CODE;
|
code = BIBITEM_CODE;
|
||||||
else if (cmd.argument() == "bibtex")
|
else if (cmd.argument() == "bibtex") {
|
||||||
code = BIBTEX_CODE;
|
code = BIBTEX_CODE;
|
||||||
|
// not allowed in description items
|
||||||
|
enable = !inDescriptionItem(cur);
|
||||||
|
}
|
||||||
else if (cmd.argument() == "box")
|
else if (cmd.argument() == "box")
|
||||||
code = BOX_CODE;
|
code = BOX_CODE;
|
||||||
else if (cmd.argument() == "branch")
|
else if (cmd.argument() == "branch")
|
||||||
@ -2147,6 +2150,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
break;
|
break;
|
||||||
case LFUN_FLOAT_LIST_INSERT:
|
case LFUN_FLOAT_LIST_INSERT:
|
||||||
code = FLOAT_LIST_CODE;
|
code = FLOAT_LIST_CODE;
|
||||||
|
// not allowed in description items
|
||||||
|
enable = !inDescriptionItem(cur);
|
||||||
break;
|
break;
|
||||||
case LFUN_CAPTION_INSERT:
|
case LFUN_CAPTION_INSERT:
|
||||||
code = CAPTION_CODE;
|
code = CAPTION_CODE;
|
||||||
@ -2201,6 +2206,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
break;
|
break;
|
||||||
case LFUN_INDEX_PRINT:
|
case LFUN_INDEX_PRINT:
|
||||||
code = INDEX_PRINT_CODE;
|
code = INDEX_PRINT_CODE;
|
||||||
|
// not allowed in description items
|
||||||
|
enable = !inDescriptionItem(cur);
|
||||||
break;
|
break;
|
||||||
case LFUN_NOMENCL_INSERT:
|
case LFUN_NOMENCL_INSERT:
|
||||||
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
|
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
|
||||||
@ -2211,9 +2218,13 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
break;
|
break;
|
||||||
case LFUN_NOMENCL_PRINT:
|
case LFUN_NOMENCL_PRINT:
|
||||||
code = NOMENCL_PRINT_CODE;
|
code = NOMENCL_PRINT_CODE;
|
||||||
|
// not allowed in description items
|
||||||
|
enable = !inDescriptionItem(cur);
|
||||||
break;
|
break;
|
||||||
case LFUN_TOC_INSERT:
|
case LFUN_TOC_INSERT:
|
||||||
code = TOC_CODE;
|
code = TOC_CODE;
|
||||||
|
// not allowed in description items
|
||||||
|
enable = !inDescriptionItem(cur);
|
||||||
break;
|
break;
|
||||||
case LFUN_HYPERLINK_INSERT:
|
case LFUN_HYPERLINK_INSERT:
|
||||||
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
|
if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user