eric6/IconEditor/IconEditorWindow.py

changeset 8259
2bbec88047dd
parent 8240
93b8a353c4bf
child 8273
698ae46f40a4
--- a/eric6/IconEditor/IconEditorWindow.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/IconEditor/IconEditorWindow.py	Wed Apr 21 19:40:50 2021 +0200
@@ -1224,10 +1224,11 @@
         """
         self.__fileName = fileName
         
-        if not self.__fileName:
-            shownName = self.tr("Untitled")
-        else:
-            shownName = self.__strippedName(self.__fileName)
+        shownName = (
+            self.__strippedName(self.__fileName)
+            if self.__fileName else
+            self.tr("Untitled")
+        )
         
         self.setWindowTitle(self.tr("{0}[*] - {1}")
                             .format(shownName, self.tr("Icon Editor")))

eric ide

mercurial