src/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py

branch
eric7
changeset 9758
6d24ab9c0404
parent 9653
e67609152c5e
child 9975
ac49f16d2a9b
diff -r ab6e87f6f1c4 -r 6d24ab9c0404 src/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py
--- a/src/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Mon Feb 13 17:51:03 2023 +0100
+++ b/src/eric7/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Mon Feb 13 17:52:26 2023 +0100
@@ -487,7 +487,7 @@
             editor.setNoName(noName)
         else:
             txt = os.path.basename(fn)
-            if not os.access(fn, os.W_OK):
+            if editor.checkReadOnly():
                 txt = self.tr("{0} (ro)").format(txt)
             itm = QListWidgetItem(txt)
             itm.setToolTip(fn)
@@ -623,7 +623,7 @@
             currentRow = self.viewlist.currentRow()
             index = self.editors.index(editor)
             txt = os.path.basename(newName)
-            if not os.access(newName, os.W_OK):
+            if editor.checkReadOnly():
                 txt = self.tr("{0} (ro)").format(txt)
             itm = self.viewlist.item(index)
             if itm:

eric ide

mercurial