Changeset eec63a8 in sasview


Ignore:
Timestamp:
Feb 18, 2015 12:05:21 PM (10 years ago)
Author:
Mathieu Doucet <doucetm@…>
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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1394952
Parents:
e1251ef
Message:

Make sure OSX build can load images.

File:
1 edited

Legend:

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

    r7a04dbb reec63a8  
    5959                plot_frame = ImageFrame(parent, -1, basename, img) 
    6060                plot_frame.Show(False) 
    61                 #plot_frame.im_show(img) 
    6261                ax = plot_frame.plotpanel 
    6362                if not is_png: 
     
    7372            except: 
    7473                print "parent", parent 
    75                 raise 
    7674                err_msg += "Failed to load '%s'.\n"% basename 
    7775        if err_msg: 
     
    8078            else: 
    8179                print err_msg 
    82  
    8380         
    8481    def choose_data_file(self, location=None): 
     
    8683        Open a file dialog to allow loading a file 
    8784        """ 
    88         parent = self.parent 
    8985        path = None 
    9086        if location == None: 
    9187            location = os.getcwd() 
    92         wlist = '' 
    93         elist = ["All images (*.png, *.bmp, *.gif, *.jpg, *.tif, *.tiff) | \ 
    94                 *.png; *.bmp; *.gif; *.jpg; *.tif; *.tiff",  
    95                 "PNG files (*.PNG, *.png) | *.png",  
    96                 "BMP files (*.BMP, *.bmp) | *.bmp",  
    97                 "GIF files (*.GIF, *.gif) | *.gif", 
    98                 "JPG files (*.JPG, *.jpg) | *.jpg", 
    99                 "TIF files (*.TIF, *.tif) | *.tif", 
    100                 "TIFF files (*.TIFF, *.tiff) | *.tiff"] 
    101         if not IS_WIN: 
    102             del elist[0] 
    103         elist.append("All files (*.*) | *.*") 
    104         wlist = '|'.join(elist)         
    105         style = wx.OPEN|wx.FD_MULTIPLE 
    106         dlg = wx.FileDialog(parent, "Image Viewer: Choose a image file",  
    107                             location, "", wlist, style=style) 
     88        dlg = wx.FileDialog(self.parent, "Image Viewer: Choose a image file",  
     89                            location, "", "", style=wx.FD_OPEN|wx.FD_MULTIPLE) 
    10890        if dlg.ShowModal() == wx.ID_OK: 
    10991            path = dlg.GetPaths() 
Note: See TracChangeset for help on using the changeset viewer.