mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
remove some useless workarounds in getStatus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24942 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
703eca7670
commit
050ec93722
@ -1907,7 +1907,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
case LFUN_APPENDIX:
|
||||
flag.setOnOff(cur.paragraph().params().startOfAppendix());
|
||||
return true;
|
||||
break;
|
||||
|
||||
case LFUN_BIBITEM_INSERT:
|
||||
enable = (cur.paragraph().layout().labeltype == LABEL_BIBLIO
|
||||
|
@ -223,7 +223,6 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_INSET_MODIFY:
|
||||
if (cmd.getArg(0) == "changetype")
|
||||
flag.setOnOff(cmd.getArg(1) == params_.type);
|
||||
else
|
||||
flag.enabled(true);
|
||||
return true;
|
||||
|
||||
|
@ -164,7 +164,7 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
string const newtype = cmd.getArg(1);
|
||||
status.enabled(p_.isCompatibleCommand(p_.code(), newtype));
|
||||
status.setOnOff(newtype == p_.getCmdName());
|
||||
} else
|
||||
}
|
||||
status.enabled(true);
|
||||
return true;
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
|
@ -115,9 +115,8 @@ bool InsetNewline::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
InsetNewlineParams params;
|
||||
string2params(to_utf8(cmd.argument()), params);
|
||||
status.setOnOff(params_.kind == params.kind);
|
||||
} else {
|
||||
status.enabled(true);
|
||||
}
|
||||
status.enabled(true);
|
||||
return true;
|
||||
default:
|
||||
return Inset::getStatus(cur, cmd, status);
|
||||
|
@ -163,9 +163,8 @@ bool InsetNewpage::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
InsetNewpageParams params;
|
||||
string2params(to_utf8(cmd.argument()), params);
|
||||
status.setOnOff(params_.kind == params.kind);
|
||||
} else {
|
||||
status.enabled(true);
|
||||
}
|
||||
status.enabled(true);
|
||||
return true;
|
||||
default:
|
||||
return Inset::getStatus(cur, cmd, status);
|
||||
|
@ -158,9 +158,8 @@ bool InsetSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
InsetSpaceParams params;
|
||||
string2params(to_utf8(cmd.argument()), params);
|
||||
status.setOnOff(params_.kind == params.kind);
|
||||
} else {
|
||||
status.enabled(true);
|
||||
}
|
||||
status.enabled(true);
|
||||
return true;
|
||||
default:
|
||||
return Inset::getStatus(cur, cmd, status);
|
||||
|
@ -89,9 +89,8 @@ bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
VSpace vspace;
|
||||
InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
|
||||
status.setOnOff(vspace == space_);
|
||||
} else {
|
||||
status.enabled(true);
|
||||
}
|
||||
status.enabled(true);
|
||||
return true;
|
||||
default:
|
||||
return Inset::getStatus(cur, cmd, status);
|
||||
|
Loading…
x
Reference in New Issue
Block a user