]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Try even harder to obtain an instant preview
[lyx.git] / src / Text3.cpp
index af15c313f2294c81521b5b0221c7990af34bf17f..f80bde6554d38c8fe10b5f0c9aaaec32fbec7aa1 100644 (file)
@@ -47,6 +47,7 @@
 #include "TextMetrics.h"
 #include "WordLangTuple.h"
 
+#include "frontends/alert.h"
 #include "frontends/Application.h"
 #include "frontends/Clipboard.h"
 #include "frontends/Selection.h"
@@ -1301,8 +1302,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        else if (arg == "wmf")
                                type = Clipboard::WmfGraphicsType;
                        else
-                               // We used to assert, but couldn't the argument come from, say, the
-                               // minibuffer and just be mistyped?
+                               // we also check in getStatus()
                                LYXERR0("Unrecognized graphics type: " << arg);
 
                        pasteClipboardGraphics(cur, bv->buffer().errorList("Paste"), type);
@@ -1311,6 +1311,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                bv->buffer().errors("Paste");
                cur.clearSelection(); // bug 393
                cur.finishUndo();
+               bv->buffer().updatePreviews();
                break;
        }
 
@@ -2286,6 +2287,13 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                                arg += " lang=" + from_ascii(cur.getFont().language()->lang());
                        }
                }
+               if (lyxrc.thesaurusdir_path.empty()) {
+                       frontend::Alert::warning(_("Path to thesaurus directory not set!"),
+                                       _("The path to the thesaurus directory has not been specified.\n"
+                                         "The thesaurus is not functional.\n"
+                                         "Please refer to sec. 6.15.1 of the User's Guide for setup\n"
+                                         "instructions."));
+               }
                bv->showDialog("thesaurus", to_utf8(arg));
                break;
        }
@@ -2935,6 +2943,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                }
 
                // unknown argument
+               LYXERR0("Unrecognized graphics type: " << arg);
+               // we don't want to assert if the user just mistyped the LFUN
+               LATTEST(cmd.origin() != FuncRequest::INTERNAL);
                enable = false;
                break;
         }