Skip to content

Commit

Permalink
[pyqgis-console] use asterisk to track changes in script
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa authored and nyalldawson committed Oct 19, 2020
1 parent 9edd827 commit 3c0fb94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/console/console_editor.py
Expand Up @@ -899,8 +899,8 @@ def newTabEditor(self, tabName=None, filename=None):

def tabModified(self, tab, modified):
index = self.indexOf(tab)
color = Qt.darkGray if modified else Qt.black
self.tabBar().setTabTextColor(index, color)
s = self.tabText(index)
self.setTabTitle(index, '*{}'.format(s) if modified else re.sub(r'^(\*)', '', s))
self.parent.saveFileButton.setEnabled(modified)

def closeTab(self, tab):
Expand Down

0 comments on commit 3c0fb94

Please sign in to comment.