fix getStatus of LFUN_DISSOLVE_INSET:

* src/text3.C (getStatus): 
	disable the lfun in MainText.
* src/insets/insettabular.C (getStatus):
	disable inset-dissolve completely.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14879 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-09-03 13:39:54 +00:00
parent f81e924143
commit bae41d8a3b
2 changed files with 23 additions and 1 deletions

View File

@ -1045,6 +1045,28 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
return true; return true;
} }
case LFUN_INSET_DISSOLVE: {
status.enabled(false);
return true;
}
// because of the dissolve handling in insettext:
case LFUN_CHAR_DELETE_FORWARD:
if (!cur.selection() && cur.depth() > 1
&& cur.pit() == cur.lastpit()
&& cur.pos() == cur.lastpos()) {
status.enabled(false);
return true;
}
// Fall through
case LFUN_CHAR_DELETE_BACKWARD:
if (cur.depth() > 1 && cur.pit() == 0 && cur.pos() == 0) {
status.enabled(false);
return true;
}
// Fall through
case LFUN_INSET_MODIFY: case LFUN_INSET_MODIFY:
if (translate(cmd.getArg(0)) == TABULAR_CODE) { if (translate(cmd.getArg(0)) == TABULAR_CODE) {
status.enabled(true); status.enabled(true);

View File

@ -1731,7 +1731,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
} }
case LFUN_INSET_DISSOLVE: { case LFUN_INSET_DISSOLVE: {
enable = &cur.inset() && cur.inTexted(); enable = !isMainText() && cur.inTexted();
break; break;
} }