Skip to content

Commit

Permalink
Reset modification status after opening or creating a new file
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-urbanczyk committed Apr 12, 2019
1 parent e863d1b commit 7ca1b92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/widgets/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def updatePreferences(self,*args):

def new(self):

self.filename = ''
self.set_text('')
self.filename = ''
self.reset_modified()

def open(self):

Expand All @@ -119,6 +120,7 @@ def load_from_file(self,fname):

self.set_text_from_file(fname)
self.filename = fname
self.reset_modified()

def save(self):

Expand Down

0 comments on commit 7ca1b92

Please sign in to comment.