Tweak the previous checkin to deal with a dynamic change to 0 results properly.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 01:16:20 +0000 (01:16 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 01:16:20 +0000 (01:16 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8467 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/kwq/KWQLineEdit.mm

index db08ab97ebf51d806314f5e36369cf0e60729605..29b747453f8b24c196883b7c9d0f184e227f4c60 100644 (file)
@@ -336,7 +336,9 @@ void QLineEdit::setMaxResults(int maxResults)
         NSButtonCell* buttonCell = [searchCell searchButtonCell];
         if (!buttonCell)
             [searchCell resetSearchButtonCell];
-        if (!cellMenu && maxResults > 0)
+        if (cellMenu && !maxResults)
+           [searchCell setSearchMenuTemplate:nil];
+        else if (!cellMenu && maxResults)
             [searchCell setSearchMenuTemplate:[[WebCoreViewFactory sharedFactory] cellMenuForSearchField]];
     }