]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
the spellcheck cleanup
[lyx.git] / src / cursor.C
index f7b876e342a14bc89e7ee4f83c366c591733dc2b..3e27a8054190d2ade0e986c86e5f0975124c8593 100644 (file)
@@ -28,21 +28,18 @@ using std::endl;
 DispatchResult Cursor::dispatch(FuncRequest const & cmd)
 {
        for (int i = data_.size() - 1; i >= 0; --i) {
-               lyxerr << "trying to dispatch to inset" << data_[i].inset_ << endl;
-               DispatchResult res = data_[i].inset_->dispatch(cmd);
-               lyxerr << "   result: " << res.val() << endl;
+               CursorItem & citem = data_[i];
 
-               if (res == DispatchResult(DISPATCHED)) {
-                       //update();
-                       return DispatchResult(DISPATCHED);
-               }
+               lyxerr << "trying to dispatch to inset" << citem.inset_ << endl;
+               DispatchResult res = citem.inset_->dispatch(cmd);
+               lyxerr << "   result: " << res.val() << endl;
 
-               if (res == DispatchResult(DISPATCHED_NOUPDATE))
-                       return DispatchResult(DISPATCHED);
+               if (res.dispatched())
+                       return res;
 
                lyxerr << "# unhandled result: " << res.val() << endl;
        }
-       return DispatchResult(UNDISPATCHED);
+       return DispatchResult(false);
 }