Changeset 2929 for branch


Ignore:
Timestamp:
Jul 12, 2017 1:09:37 PM (6 years ago)
Author:
toby
Message:

fix seq. ref. window; screen positioning bug; read of multiple data files after use of defaults parms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIdataGUI.py

    r2927 r2929  
    18221822#        lastVals = []
    18231823        self.EnablePlot = False
     1824        Iparms = {}
    18241825        for rd in rdlist:
    18251826            if 'Instrument Parameters' in rd.pwdparms:
    18261827                Iparm1,Iparm2 = rd.pwdparms['Instrument Parameters']
     1828            elif Iparms and not lastIparmfile:
     1829                Iparm1,Iparm2 = Iparms
    18271830            else:
    18281831                # get instrument parameters for each dataset, unless already set
     
    18371840                if rd.repeat_instparm:
    18381841                    lastIparmfile = rd.instfile
     1842                else:
     1843                    Iparms = {}
    18391844#                    lastVals = (rd.powderdata[0].min(),rd.powderdata[0].max(),len(rd.powderdata[0]))
    18401845                # override any keys in read instrument parameters with ones set in import
     
    28752880        self.G2plotNB = G2plt.G2PlotNoteBook(self.plotFrame,G2frame=self)
    28762881        self.plotFrame.Show()
    2877        
    2878         main_pos = eval(GSASIIpath.GetConfigValue('Main_Pos'))
    2879         self.SetPosition(main_pos)
     2882
     2883        try:
     2884            main_pos = eval(GSASIIpath.GetConfigValue('Main_Pos'))
     2885            self.SetPosition(main_pos)
     2886        except:
     2887            if GSASIIpath.GetConfigValue('Main_Pos'):
     2888                print('Value for config Main_Pos {} is invalid'.format(GSASIIpath.GetConfigValue('Main_Pos')))
    28802889#        if not self.IsShownOnScreen():
    28812890#            self.Centre()
    2882         plot_pos = eval(GSASIIpath.GetConfigValue('Plot_Pos'))
    2883         self.plotFrame.SetPosition(plot_pos)
     2891        try:
     2892            plot_pos = eval(GSASIIpath.GetConfigValue('Plot_Pos'))
     2893            self.plotFrame.SetPosition(plot_pos)
     2894        except:
     2895            if GSASIIpath.GetConfigValue('Plot_Pos'):
     2896                print('Value for config Plot_Pos {} is invalid'.format(GSASIIpath.GetConfigValue('Plot_Pos')))
    28842897#        if not self.plotFrame.IsShownOnScreen():
    28852898#            self.plotFrame.Centre()
     
    72957308            del G2frame.colSigs[l]
    72967309
     7310    G2frame.dataWindow.ClearData()
    72977311    G2frame.dataWindow.currentGrids = []
    72987312    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataWindow)
     
    73217335                G2frame.dataDisplay.SetCellStyle(row,deltaChiCol,color=wx.Colour(255,255,0))
    73227336    G2frame.dataDisplay.InstallGridToolTip(GridSetToolTip,GridColLblToolTip)
    7323     G2frame.dataDisplay.SendSizeEvent() # resize needed on mac
    7324     G2frame.dataDisplay.Refresh() # shows colored text on mac
     7337    #G2frame.dataDisplay.SendSizeEvent() # resize needed on mac
     7338    #G2frame.dataDisplay.Refresh() # shows colored text on mac
     7339    G2frame.dataWindow.SetDataSize()
    73257340   
    73267341################################################################################
Note: See TracChangeset for help on using the changeset viewer.