Make comboboxes update when the current item is changed.
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2007 22:01:41 +0000 (22:01 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2007 22:01:41 +0000 (22:01 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/qt/PopupMenuQt.cpp
WebCore/platform/qt/QWebPopup.cpp

index 9b36c86f5509558aef1cf71c8a751314ef35f781..eb75c820ce44f3868b8be70056d12c9e5a2f0d76 100644 (file)
@@ -1,3 +1,14 @@
+2007-07-11  George Staikos  <staikos@kde.org>
+
+        Reviewed by Olliej.
+
+        Make comboboxes update when the current item is changed.
+
+        * platform/qt/PopupMenuQt.cpp:
+        (WebCore::PopupMenu::updateFromElement):
+        * platform/qt/QWebPopup.cpp:
+        (WebCore::QWebPopup::activeChanged):
+
 2007-07-11  George Staikos  <staikos@kde.org>
 
         Reviewed by Brady.
index c613130f8ba82f3b90bf5f5c77e21d7fb73b0659..53b05e4150f507f7e2fc595345b4fae70df6f94f 100644 (file)
@@ -107,6 +107,7 @@ void PopupMenu::hide()
 
 void PopupMenu::updateFromElement()
 {
+    client()->setTextFromItem(m_popupClient->selectedIndex());
 }
 
 bool PopupMenu::itemWritingDirectionIsNatural()
index c13825907247aefaae3817cd8c4e862b207644ab..814eb855827cfbf7d03c4abeaa1efc3eb99aad62 100644 (file)
@@ -49,8 +49,11 @@ void QWebPopup::hideEvent(QHideEvent* e)
 
 void QWebPopup::activeChanged(int index)
 {
-    if (m_client)
-        m_client->valueChanged(index);
+    if (m_client) {
+        if (index >= 0)
+            m_client->valueChanged(index);
+        m_client->hidePopup();
+    }
 }
 
 }