Corrected an issue in the server file selection dialog causing the selection not to work properly. server

Fri, 23 Feb 2024 16:48:45 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 23 Feb 2024 16:48:45 +0100
branch
server
changeset 10602
a767e9c400fa
parent 10601
a8775ecd25dc
child 10603
8093b9e14b75

Corrected an issue in the server file selection dialog causing the selection not to work properly.

src/eric7/RemoteServerInterface/EricServerFileDialog.py file | annotate | diff | comparison | revisions
--- a/src/eric7/RemoteServerInterface/EricServerFileDialog.py	Fri Feb 23 10:46:46 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerFileDialog.py	Fri Feb 23 16:48:45 2024 +0100
@@ -352,18 +352,21 @@
         else:
             self.__selectedDirectory = None
 
-        selected = []
-        for itm in self.listing.selectedItems():
+        selectedNames = []
+        selectedItems = self.listing.selectedItems()
+        for itm in selectedItems:
             isDir = itm.data(0, EricServerFileDialog.IsDirectoryRole)
             if self.__fileMode == FileMode.Directory and isDir:
-                selected.append(itm.text(0))
+                selectedNames.append(itm.text(0))
             elif not isDir:
-                selected.append(itm.text(0))
+                selectedNames.append(itm.text(0))
 
-        if len(selected) == 1:
-            self.nameEdit.setText(selected[0])
-        elif len(selected) > 1:
-            self.nameEdit.setText('"{0}"'.format('" "'.join(selected)))
+        blocked = self.nameEdit.blockSignals(True)
+        if len(selectedNames) == 1:
+            self.nameEdit.setText(selectedNames[0])
+        elif len(selectedNames) > 1:
+            self.nameEdit.setText('"{0}"'.format('" "'.join(selectedNames)))
+        self.nameEdit.blockSignals(blocked)
 
         self.__updateOkButton()
 

eric ide

mercurial