From f54ef5c1739f18fe2cdd474a9d0e30a96e506797 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sun, 16 Nov 2008 16:34:16 +0000 Subject: [PATCH] * open popup on complete-accept if there is a completion available git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27561 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiCompleter.cpp | 6 +++--- src/frontends/qt4/GuiView.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiCompleter.cpp b/src/frontends/qt4/GuiCompleter.cpp index 2eb5f18e35..a110bb21e0 100644 --- a/src/frontends/qt4/GuiCompleter.cpp +++ b/src/frontends/qt4/GuiCompleter.cpp @@ -625,9 +625,9 @@ void GuiCompleter::hideInline() void GuiCompleter::activate() { if (!popupVisible() && !inlineVisible()) - return; - - popupActivated(currentCompletion()); + tab(); + else + popupActivated(currentCompletion()); } diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 108bd0451e..d45b939466 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1300,7 +1300,14 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) break; case LFUN_COMPLETION_ACCEPT: - case LFUN_COMPLETION_CANCEL: + if (!d.current_work_area_ + || (!d.current_work_area_->completer().popupVisible() + && !d.current_work_area_->completer().inlineVisible() + && !d.current_work_area_->completer().completionAvailable())) + enable = false; + break; + + case LFUN_COMPLETION_CANCEL: if (!d.current_work_area_ || (!d.current_work_area_->completer().popupVisible() && !d.current_work_area_->completer().inlineVisible()))