From 3bb4d6559d46b9a541d6c12f105f659e82c49e53 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Mon, 20 Dec 2010 07:10:05 +0000 Subject: [PATCH] little optimization: avoid a duplicate cursor get from buffer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36963 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Menus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 56355ff9cb..bd2e35c6d7 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -747,10 +747,10 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) return; WordLangTuple wl; docstring_list suggestions; - pos_type from = bv->cursor().pos(); - pos_type to = from; Cursor const & cur = bv->cursor(); Paragraph const & par = cur.paragraph(); + pos_type from = cur.pos(); + pos_type to = from; SpellChecker::Result res = par.spellCheck(from, to, wl, suggestions, true, true); switch (res) { case SpellChecker::UNKNOWN_WORD: -- 2.39.2