+bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
+ FuncStatus & status) const
+{
+ bool enabled;
+ switch (cmd.action()) {
+ case LFUN_LABEL_INSERT_AS_REFERENCE:
+ case LFUN_LABEL_COPY_AS_REFERENCE:
+ enabled = true;
+ break;
+ case LFUN_INSET_MODIFY:
+ if (cmd.getArg(0) == "changetype") {
+ // this is handled by InsetCommand,
+ // but not by InsetLabel.
+ enabled = false;
+ break;
+ }
+ default:
+ return InsetCommand::getStatus(cur, cmd, status);
+ }
+
+ status.setEnabled(enabled);
+ return true;
+}
+
+