Changeset 6813da7d in sasview for inversionview/src/sans


Ignore:
Timestamp:
Oct 21, 2011 4:21:06 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
727a710
Parents:
43ede45
Message:

dialog fixes

Location:
inversionview/src/sans/perspectives/pr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inversionview/src/sans/perspectives/pr/pr.py

    r18476d6 r6813da7d  
    13771377                msg += "Prview does not allow multiple data!\n" 
    13781378                msg += "Please select one.\n" 
    1379                 from pr_widgets import DataDialog 
    1380                 dlg = DataDialog(data_list=data_1d_list, text=msg) 
    1381                 if dlg.ShowModal() == wx.ID_OK: 
    1382                     data = dlg.get_data() 
    1383                 dlg.Destroy() 
     1379                if len(data_list) > 1: 
     1380                    from pr_widgets import DataDialog 
     1381                    dlg = DataDialog(data_list=data_1d_list, text=msg) 
     1382                    if dlg.ShowModal() == wx.ID_OK: 
     1383                        data = dlg.get_data() 
     1384                    else: 
     1385                        data = None 
     1386                    dlg.Destroy() 
    13841387            if data is None: 
    13851388                msg += "PrView receives no data. \n" 
  • inversionview/src/sans/perspectives/pr/pr_widgets.py

    r3ecaa2b r6813da7d  
    161161        wx.Dialog.__init__(self, parent, *args, **kwds) 
    162162        self.list_of_ctrl = [] 
    163         if not data_list: 
    164             return  
    165163        self._sizer_main = wx.BoxSizer(wx.VERTICAL) 
    166164        self._sizer_txt = wx.BoxSizer(wx.VERTICAL) 
     
    169167        self._panel = DialogPanel(self, style=wx.RAISED_BORDER, 
    170168                               size=(WIDTH-20, HEIGHT/3)) 
    171         self.SetSizer(self._sizer_main) 
     169        
    172170        self.__do_layout(data_list, text=text) 
    173         self.Layout() 
     171         
    174172         
    175173    def __do_layout(self, data_list, text=''): 
     
    177175        layout the dialog 
    178176        """ 
    179         if not data_list or len(data_list) <= 1: 
    180             return  
     177        #if not data_list or len(data_list) <= 1: 
     178        #    return  
    181179        #add text 
    182180        if text.strip() == "": 
     
    219217        self._sizer_main.Add(static_line, 0, wx.EXPAND, 0) 
    220218        self._sizer_main.Add(self._sizer_button, 0, wx.EXPAND|wx.ALL, 10) 
    221          
     219        self.SetSizer(self._sizer_main) 
    222220         
    223221    def get_data(self): 
Note: See TracChangeset for help on using the changeset viewer.