From: Tommaso Cucinotta Date: Sun, 31 Jan 2010 21:38:18 +0000 (+0000) Subject: Inhibits insertion of Regexp insets within InsetERT context (and fixes #6495). X-Git-Tag: 2.0.0~4164 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0881479c486ea98fdd5038895ca1bd0a868f11f6;p=lyx.git Inhibits insertion of Regexp insets within InsetERT context (and fixes #6495). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33302 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 64f3065898..92de71d7fe 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -62,6 +62,7 @@ #include "insets/InsetRef.h" #include "insets/InsetText.h" #include "insets/InsetNote.h" +#include "insets/InsetERT.h" #include "frontends/alert.h" #include "frontends/Application.h" @@ -1026,7 +1027,7 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag) case LFUN_REGEXP_MODE: // FIXME: Test if current WorkArea is the search WorkArea - flag.setEnabled(buffer().isInternal() && !cur.inRegexped()); + flag.setEnabled(buffer().isInternal() && !cur.inRegexped() && !dynamic_cast(&cur.inset())); break; case LFUN_LABEL_COPY_AS_REF: {