]> git.lyx.org Git - lyx.git/commitdiff
A bit more cleanup: Again, we do not need lv, and the last check is
authorRichard Heck <rgheck@comcast.net>
Wed, 7 Apr 2010 12:43:41 +0000 (12:43 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 7 Apr 2010 12:43:41 +0000 (12:43 +0000)
useless.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34073 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp

index a1d10e1baf82319c46b19b1fc5a71fda9fc04f24..6d8978c72a6d9ebaeaf201922cd66f9aabb06a82 100644 (file)
@@ -1674,19 +1674,17 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
 {
        LYXERR(Debug::KEY, "KeySym is " << keysym.getSymbolName());
 
-       GuiView * lv = currentView();
-
        // Do nothing if we have nothing (JMarc)
        if (!keysym.isOK()) {
                LYXERR(Debug::KEY, "Empty kbd action (probably composing)");
-               lv->restartCursor();
+               current_view_->restartCursor();
                return;
        }
 
        if (keysym.isModifier()) {
                LYXERR(Debug::KEY, "isModifier true");
-               if (lv)
-                       lv->restartCursor();
+               if (current_view_)
+                       current_view_->restartCursor();
                return;
        }
 
@@ -1723,7 +1721,7 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
        // num_bytes == 0? (Lgb)
 
        if (d->keyseq.length() > 1)
-               lv->message(d->keyseq.print(KeySequence::ForGui));
+               current_view_->message(d->keyseq.print(KeySequence::ForGui));
 
 
        // Maybe user can only reach the key via holding down shift.
@@ -1744,8 +1742,8 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
                                           FuncRequest::KEYBOARD);
                } else {
                        LYXERR(Debug::KEY, "Unknown, !isText() - giving up");
-                       lv->message(_("Unknown function."));
-                       lv->restartCursor();
+                       current_view_->message(_("Unknown function."));
+                       current_view_->restartCursor();
                        return;
                }
        }
@@ -1757,11 +1755,8 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
                                             FuncRequest::KEYBOARD));
                        LYXERR(Debug::KEY, "SelfInsert arg[`" << to_utf8(arg) << "']");
                }
-       } else {
+       } else
                lyx::dispatch(func);
-               if (!lv)
-                       return;
-       }
 }