]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Fix bug 886 and others not reported related with the document paper size.
[lyx.git] / src / lyxfunc.C
index 968d9bd25bd154d2bb4a08acbc02f4ef9fbbc6f6..a679f52b4bb2ebd19bd10c2a03ca3f65b46f3ad4 100644 (file)
@@ -428,12 +428,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                enable = false;
                if (!cur)
                        break;
-               UpdatableInset * inset = cur.inset().asUpdatableInset();
-               lyxerr << "inset: " << inset << endl;
-               if (!inset)
-                       break;
-
-               InsetBase::Code code = inset->lyxCode();
+               InsetBase::Code code = cur.inset().lyxCode();
                switch (code) {
                        case InsetBase::TABULAR_CODE:
                                enable = cmd.argument == "tabular";
@@ -957,7 +952,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
 
                case LFUN_QUIT:
-                       QuitLyX();
+                       QuitLyX(argument == "force");
                        break;
 
                case LFUN_TOCVIEW: {
@@ -1475,11 +1470,13 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                break;
 
                        owner->message(_("Converting document to new document class..."));
+                       StableDocIterator backcur(view()->cursor());
                        ErrorList el;
                        lyx::cap::SwitchBetweenClasses(
                                old_class, new_class,
                                buffer->paragraphs(), el);
 
+                       view()->setCursor(backcur.asDocIterator(&(buffer->inset())));
                        bufferErrors(*buffer, el);
                        view()->showErrorList(_("Class switch"));
                        updateCounters(*buffer);