Changeset 6479f3a in sasview for src


Ignore:
Timestamp:
Sep 17, 2017 2:55:16 PM (7 years ago)
Author:
butler
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
412e9e8b
Parents:
f9b61ca
Message:

Add file choice

Add file choice of all allowed image files (as opposed to all files) and
make the default choice.
Need to update images in rst help. Also seems to be a bug in
matplotlib.image being used (not properly closing the file after a
read?" the first should be fixed before merging. Second may leave for
another time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/image_viewer.py

    rc245ca4 r6479f3a  
    8989        if location is None: 
    9090            location = os.getcwd() 
    91         wildcard="Bitmap (*.bmp)|*.bmp|"\ 
     91        wildcard="Images (*.bmp;*.gif;*jpeg,*jpg;*.png;*tif;*.tiff)|*bmp;\ 
     92            *.gif; *.jpg; *.jpeg;*png;*.png;*.tif;*.tiff|"\ 
     93            "Bitmap (*.bmp)|*.bmp|"\ 
    9294            "GIF (*.gif)|*.gif|"\ 
    9395            "JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|"\ 
     
    9799 
    98100        dlg = wx.FileDialog(self.parent, "Image Viewer: Choose an image file", 
    99                             location, "", wildcard, style=wx.FD_OPEN | wx.FD_MULTIPLE) 
     101                            location, "", wildcard, style=wx.FD_OPEN 
     102                            | wx.FD_MULTIPLE) 
    100103        if dlg.ShowModal() == wx.ID_OK: 
    101104            path = dlg.GetPaths() 
Note: See TracChangeset for help on using the changeset viewer.