aboutsummaryrefslogtreecommitdiff
path: root/src/views/mcompleterview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/mcompleterview.cpp')
-rw-r--r--src/views/mcompleterview.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/views/mcompleterview.cpp b/src/views/mcompleterview.cpp
index 546094e7..935bee1a 100644
--- a/src/views/mcompleterview.cpp
+++ b/src/views/mcompleterview.cpp
@@ -93,7 +93,6 @@ void MCompleterViewPrivate::init()
{
connect(completionsButton, SIGNAL(clicked()), this, SLOT(showPopup()));
connect(controller, SIGNAL(shown()), this, SLOT(createContents()));
- connect(controller, SIGNAL(hidden()), this, SLOT(clear()));
if (controller->widget()) {
connect(controller->widget()->sceneManager(),
SIGNAL(orientationChangeFinished(const M::Orientation &)),
@@ -392,4 +391,18 @@ void MCompleterView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
event->accept();
}
+void MCompleterView::updateData(const QList<const char *>& modifications)
+{
+ Q_D(MCompleterView);
+
+ if (modifications.contains(MCompleterModel::Active)) {
+ if (!model()->active()) {
+ // clear focus proxy when control become inactive (before really hidden
+ // to avoid focus out)
+ d->clear();
+ }
+ }
+ MSceneWindowView::updateData(modifications);
+}
+
M_REGISTER_VIEW_NEW(MCompleterView, MCompleter)