From 6031b5cb3147af24f71ae79f21985a0d5ba9fae2 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 7 Apr 2010 12:43:41 +0000 Subject: [PATCH] A bit more cleanup: Again, we do not need lv, and the last check is useless. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34073 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index a1d10e1baf..6d8978c72a 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -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; - } } -- 2.39.2