Skip to content

Commit

Permalink
[#432] Save screengrab
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Apr 5, 2017
1 parent 5b4e7bd commit 2bbfa17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This is an overview of major changes. Refer to the git repository for a full log

Version 0.1.36
-------------
- #432 Ugly error message when saving screen grab
- #429 Code layout

Version 0.1.35
Expand Down
4 changes: 1 addition & 3 deletions inselect/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def save_screengrab(self, checked=False):
}

# Only some of these make sense. For example, do not offer the user
# the change to save an eps, which is a format supported by QImageWriter
# the chance to save to eps, which is a format supported by QImageWriter
extensions = sorted(extensions.intersection(IMAGE_PATTERNS))

filter = 'Images ({0})'.format(' '.join(extensions))
Expand Down Expand Up @@ -633,8 +633,6 @@ def save_screengrab(self, checked=False):

# Write using QImageWriter, which makes richer error information
# avaible than QPixmap.save()
from pprint import pprint
pprint(path)
writer = QImageWriter(path)
if not writer.write(pm.toImage()):
msg = 'An error occurred writing to [{0}]: [{1}]'
Expand Down

0 comments on commit 2bbfa17

Please sign in to comment.