A better fix for bug 675:

http://bugzilla.lyx.org/show_bug.cgi?id=675

The former one also disabled cross-reference insertion.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17008 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-02-01 14:43:13 +00:00
parent bda886f39e
commit 969ab85d98
2 changed files with 12 additions and 4 deletions

View File

@ -199,10 +199,14 @@ bool InsetCaption::getStatus(LCursor & cur, FuncRequest const & cmd,
status.enabled(false);
return true;
case LFUN_DIALOG_SHOW_NEW_INSET:
case LFUN_INSET_INSERT: {
string const name = cmd.getArg(0);
if (name == "graphics"
|| name == "include") {
if (name == "float"
|| name == "graphics"
|| name == "include"
|| name == "wrap"
) {
status.enabled(false);
return true;
}

View File

@ -576,8 +576,12 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
}
case LFUN_DIALOG_SHOW_NEW_INSET:
enable = cur.inset().lyxCode() != InsetBase::ERT_CODE
&& cur.inset().lyxCode() != InsetBase::CAPTION_CODE;
enable = cur.inset().lyxCode() != InsetBase::ERT_CODE;
if (cur.inset().lyxCode() == InsetBase::CAPTION_CODE) {
FuncStatus flag;
if (cur.inset().getStatus(cur, cmd, flag))
return flag;
}
break;
case LFUN_DIALOG_UPDATE: {