eric6/Preferences/ConfigurationPages/EditorFilePage.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8258
82b608e352ec
diff -r 0572a215bd2f -r 5994b80b8760 eric6/Preferences/ConfigurationPages/EditorFilePage.py
--- a/eric6/Preferences/ConfigurationPages/EditorFilePage.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/Preferences/ConfigurationPages/EditorFilePage.py	Sun Apr 11 18:45:10 2021 +0200
@@ -298,11 +298,10 @@
             self.tr("Add File Filter"),
             self.tr("Enter the file filter entry:"),
             QLineEdit.EchoMode.Normal)
-        if ok and fileFilter:
-            if self.__checkFileFilter(fileFilter):
-                self.fileFiltersList.addItem(fileFilter)
-                self.__extractFileFilters()
-                self.__setDefaultFiltersLists(keepSelection=True)
+        if ok and fileFilter and self.__checkFileFilter(fileFilter):
+            self.fileFiltersList.addItem(fileFilter)
+            self.__extractFileFilters()
+            self.__setDefaultFiltersLists(keepSelection=True)
     
     @pyqtSlot()
     def on_editFileFilterButton_clicked(self):
@@ -316,11 +315,10 @@
             self.tr("Enter the file filter entry:"),
             QLineEdit.EchoMode.Normal,
             fileFilter)
-        if ok and fileFilter:
-            if self.__checkFileFilter(fileFilter):
-                self.fileFiltersList.currentItem().setText(fileFilter)
-                self.__extractFileFilters()
-                self.__setDefaultFiltersLists(keepSelection=True)
+        if ok and fileFilter and self.__checkFileFilter(fileFilter):
+            self.fileFiltersList.currentItem().setText(fileFilter)
+            self.__extractFileFilters()
+            self.__setDefaultFiltersLists(keepSelection=True)
     
     @pyqtSlot()
     def on_deleteFileFilterButton_clicked(self):

eric ide

mercurial