Disallow any inset inside ERT

Attempting to do this crashes in master, and is not supported anyway.
This commit is contained in:
Juergen Spitzmueller 2018-07-10 07:11:59 +02:00
parent a007b65202
commit d41c3f27d9
2 changed files with 5 additions and 0 deletions

View File

@ -188,6 +188,9 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_INSET_END_EDIT:
status.setEnabled(tempfile_ != 0);
return true;
case LFUN_INSET_INSERT:
status.setEnabled(false);
return true;
case LFUN_INSET_MODIFY:
if (cmd.getArg(0) == "ert") {
status.setEnabled(true);

View File

@ -80,6 +80,8 @@ private:
///
bool allowSpellCheck() const { return false; }
///
bool insetAllowed(InsetCode /* code */) const { return false; }
///
unique_ptr<support::TempFile> tempfile_;
};