]> git.lyx.org Git - features.git/commitdiff
Move LFUN_GRAPHICS_GROUPS_UNIFY dispatch to BufferView.
authorPavel Sanda <sanda@lyx.org>
Tue, 24 Jun 2008 07:43:47 +0000 (07:43 +0000)
committerPavel Sanda <sanda@lyx.org>
Tue, 24 Jun 2008 07:43:47 +0000 (07:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25370 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/LyXFunc.cpp

index 71bed740c5448f462c04253bb314dde78c442b6b..9dec257ac40ca59a60e96fe6aaafc709b22db227 100644 (file)
@@ -865,6 +865,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
        case LFUN_SCREEN_RECENTER:
        case LFUN_BIBTEX_DATABASE_ADD:
        case LFUN_BIBTEX_DATABASE_DEL:
+       case LFUN_GRAPHICS_GROUPS_UNIFY:
        case LFUN_NOTES_MUTATE:
        case LFUN_STATISTICS:
                flag.setEnabled(true);
@@ -1403,8 +1404,17 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                processUpdateFlags(Update::Force);
                break;
 
-       // Could be rewriten using some command like forall <insetname> <command>
+       // These Two could be rewriten using some command like forall <insetname> <command>
        // once the insets refactoring is done.
+       case LFUN_GRAPHICS_GROUPS_UNIFY: {
+               if (cmd.argument().empty())
+                       break;
+               //view()->cursor().recordUndoFullDocument(); let inset-apply do that job
+               graphics::unifyGraphicsGroups(cur.buffer(), to_utf8(cmd.argument()));
+               processUpdateFlags(Update::Force | Update::FitCursor);
+               break;
+       }
+
        case LFUN_NOTES_MUTATE: {
                if (cmd.argument().empty())
                        break;
index e9990d734f06ce11485e22c0c3640e70df01dce4..8c352c2661d34d213b36a82be11b3e8cd558aa5f 100644 (file)
@@ -582,7 +582,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_MESSAGE:
        case LFUN_INSET_EDIT:
        case LFUN_ALL_INSETS_TOGGLE:
-       case LFUN_GRAPHICS_GROUPS_UNIFY:
        case LFUN_BUFFER_LANGUAGE:
        case LFUN_TEXTCLASS_APPLY:
        case LFUN_TEXTCLASS_LOAD:
@@ -1405,16 +1404,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
                }
 
-               case LFUN_GRAPHICS_GROUPS_UNIFY: {
-                       LASSERT(lyx_view_, /**/);
-                       if (argument.empty())
-                               break;
-                       //view()->cursor().recordUndoFullDocument(); let inset-apply do that job
-                       graphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument);
-                       updateFlags = Update::Force | Update::FitCursor;
-                       break;
-               }
-
                case LFUN_BUFFER_LANGUAGE: {
                        LASSERT(lyx_view_, /**/);
                        Buffer & buffer = *lyx_view_->buffer();