Skip to content

Commit

Permalink
ignore saving if there are no log records
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Aug 28, 2017
1 parent e1ebf95 commit e54a95f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions msl/qt/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def _update_records(self, name):

def _save_records(self, checked):
"""Save the LogRecords that are currently displayed in the QTextBrowser to a file."""
if len(self._records) == 0:
prompt.information('There are no log records to save.')
return
path = prompt.save(filters={'Log Files': '*.log'}, title='Save the Log Records')
if path is None:
return
Expand Down

0 comments on commit e54a95f

Please sign in to comment.