mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
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:
parent
f81e924143
commit
bae41d8a3b
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user