Move LFUN_GRAPHICS_GROUPS_UNIFY dispatch to BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25370 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2008-06-24 07:43:47 +00:00
parent f43129f315
commit 4080b7cc24
2 changed files with 11 additions and 12 deletions

View 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;

View 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();