]> git.lyx.org Git - lyx.git/commitdiff
Refactor of r33302 (addressing #6457) according to vfr comments.
authorTommaso Cucinotta <tommaso@lyx.org>
Sun, 31 Jan 2010 22:12:23 +0000 (22:12 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Sun, 31 Jan 2010 22:12:23 +0000 (22:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33303 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 92de71d7fe253177593bc0fd21b75a2378115f99..8d6ba040f4d60689da65ead22a7d074aa954f428 100644 (file)
@@ -62,7 +62,6 @@
 #include "insets/InsetRef.h"
 #include "insets/InsetText.h"
 #include "insets/InsetNote.h"
-#include "insets/InsetERT.h"
 
 #include "frontends/alert.h"
 #include "frontends/Application.h"
@@ -1027,7 +1026,8 @@ 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() && !dynamic_cast<InsetERT*>(&cur.inset()));
+               flag.setEnabled(buffer().isInternal() && !cur.inRegexped()
+                               && cur.inset().lyxCode() != ERT_CODE);
                break;
 
        case LFUN_LABEL_COPY_AS_REF: {