case LFUN_DIALOG_TOGGLE:
case LFUN_DIALOG_SHOW:
case LFUN_DIALOG_UPDATE:
+ if (cmd.argument() == "prefs"
+ || cmd.argument() == "aboutlyx")
+ enable = true;
+ else if (lyx_view_)
+ return lyx_view_->getStatus(cmd);
+ else
+ enable = false;
+ break;
+
case LFUN_TOOLBAR_TOGGLE:
case LFUN_INSET_APPLY:
case LFUN_BUFFER_WRITE:
}
// This could be used for the no-GUI version. The GUI version is handled in
- // LyXView::getStatus().
+ // LyXView::getStatus(). See above.
/*
case LFUN_BUFFER_WRITE:
case LFUN_BUFFER_WRITE_AS: {
TextClassPtr oldClass = buffer->params().getTextClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().clearLayoutModules();
+ buffer->params().makeTextClass();
updateLayout(oldClass, buffer);
updateFlags = Update::Force | Update::FitCursor;
break;
TextClassPtr oldClass = buffer->params().getTextClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().addLayoutModule(argument);
+ buffer->params().makeTextClass();
updateLayout(oldClass, buffer);
updateFlags = Update::Force | Update::FitCursor;
break;
TextClassPtr oldClass = buffer->params().getTextClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().setBaseClass(new_class);
+ buffer->params().makeTextClass();
updateLayout(oldClass, buffer);
updateFlags = Update::Force | Update::FitCursor;
break;
textclass_type const tc = buffer->params().getBaseClass();
textclasslist.reset(tc);
buffer->params().setBaseClass(tc);
+ buffer->params().makeTextClass();
updateLayout(oldClass, buffer);
updateFlags = Update::Force | Update::FitCursor;
break;
case LFUN_BOOKMARK_GOTO:
// go to bookmark, open unopened file and switch to buffer if necessary
gotoBookmark(convert<unsigned int>(to_utf8(cmd.argument())), true, true);
+ updateFlags = Update::FitCursor;
break;
case LFUN_BOOKMARK_CLEAR:
cursorPosBeforeDispatchY_);
view()->cursor().dispatch(cmd);
updateFlags = view()->cursor().result().update();
- // Verify that the action has been dispatched.
- BOOST_ASSERT(view()->cursor().result().dispatched());
+ if (!view()->cursor().result().dispatched()) {
+ // No update needed in this case (e.g. when reaching
+ // top of document.
+ updateFlags = Update::None;
+ }
}
if (lyx_view_ && lyx_view_->buffer()) {
if (flag.enabled()
&& !lyxaction.funcHasFlag(action, LyXAction::NoBuffer)
&& !lyxaction.funcHasFlag(action, LyXAction::ReadOnly))
- lyx_view_->buffer()->markDirty();
+ lyx_view_->buffer()->markDirty();
//Do we have a selection?
theSelection().haveSelection(view()->cursor().selection());
case LyXRC::RC_USE_ESC_CHARS:
case LyXRC::RC_USE_INP_ENC:
case LyXRC::RC_USE_PERS_DICT:
+ case LyXRC::RC_USE_TOOLTIP:
case LyXRC::RC_USE_PIXMAP_CACHE:
case LyXRC::RC_USE_SPELL_LIB:
case LyXRC::RC_VIEWDVI_PAPEROPTION: