Fix:gui/qml:Added proper focus switching between graphics/gui
authorakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 24 Mar 2010 09:58:47 +0000 (09:58 +0000)
committerakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 24 Mar 2010 09:58:47 +0000 (09:58 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3080 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/gui/qml/gui_qml.cpp

index 0b198a5..1e1c7be 100644 (file)
@@ -303,6 +303,7 @@ public slots:
        }
        void backToMap() {
         if (this->object->graphicsWidget) {
+                               this_->graphicsWidget->setFocus(Qt::ActiveWindowFocusReason);
                 this->object->switcherWidget->setCurrentWidget(this->object->graphicsWidget);
         }
     }
@@ -544,6 +545,7 @@ static void gui_qml_button(void *data, int pressed, int button, struct point *p)
           to re-design the popup feature or remove it at all */
        if ( button == 3 ) {
                this_->guiProxy->setNewPoint(p,MapPoint);
+               this_->guiWidget->setFocus(Qt::ActiveWindowFocusReason);
                this_->guiWidget->reset();
                this_->guiProxy->setReturnSource(QString(""));
                this_->guiProxy->setPage("point.qml");
@@ -567,6 +569,7 @@ static void gui_qml_button(void *data, int pressed, int button, struct point *p)
                        this_->guiProxy->setReturnSource(QString(""));
                        this_->guiProxy->setPage("main.qml");
                }
+               this_->guiWidget->setFocus(Qt::ActiveWindowFocusReason);
                this_->switcherWidget->setCurrentWidget(this_->guiWidget);
        }
 }