PipPackagesWidget: fixed a bug related to searching PyPI.

Sat, 28 Mar 2020 16:28:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 28 Mar 2020 16:28:25 +0100
changeset 7477
98058d3ba634
parent 7476
5d812e0ebe56
child 7478
1709a0acc995

PipPackagesWidget: fixed a bug related to searching PyPI.

eric6/PipInterface/PipPackagesWidget.py file | annotate | diff | comparison | revisions
--- a/eric6/PipInterface/PipPackagesWidget.py	Fri Mar 27 20:25:11 2020 +0100
+++ b/eric6/PipInterface/PipPackagesWidget.py	Sat Mar 28 16:28:25 2020 +0100
@@ -561,7 +561,12 @@
         """
         Private slot initiating a search via a press of the Return key.
         """
-        self.__search()
+        if (
+            (bool(self.searchEditName.text()) or
+             bool(self.searchEditSummary.text())) and
+            self.__isPipAvailable()
+        ):
+            self.__search()
     
     @pyqtSlot(str)
     def on_searchEditSummary_textChanged(self, txt):
@@ -578,7 +583,12 @@
         """
         Private slot initiating a search via a press of the Return key.
         """
-        self.__search()
+        if (
+            (bool(self.searchEditName.text()) or
+             bool(self.searchEditSummary.text())) and
+            self.__isPipAvailable()
+        ):
+            self.__search()
     
     @pyqtSlot()
     def on_searchButton_clicked(self):

eric ide

mercurial