Changeset 1591


Ignore:
Timestamp:
Dec 2, 2014 1:30:45 PM (7 years ago)
Author:
toby
Message:

fix progress dialog problems; remove cruft from GSASII.BAT

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.BAT

    r1575 r1591  
    1414@set gsasloc=%gsasloc:\\*=\*%
    1515@set gsasloc=%gsasloc:\*=\%
    16 D:\Python27\python "%gsasloc%\GSASII.py" %1
     16python "%gsasloc%\GSASII.py" %1
    1717@REM To keep the window from disappearing with any error messages
    1818pause
  • trunk/GSASII.py

    r1578 r1591  
    34343434        #works - but it'd be better if it could restore plots
    34353435        dlg = wx.ProgressDialog('Residual','All data Rw =',101.0,
    3436             style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
    3437         screenSize = wx.ClientDisplayRect()
     3436            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT,
     3437            parent=self)
    34383438        Size = dlg.GetSize()
    3439         Size = (int(Size[0]*1.2),Size[1]) # increase size a bit along x
    3440         dlg.SetPosition(wx.Point(screenSize[2]-Size[0]-305,screenSize[1]+5))
    3441         dlg.SetSize(Size)
     3439        if 50 < Size[0] < 500: # sanity check on size, since this fails w/Win & wx3.0
     3440            dlg.SetSize((int(Size[0]*1.2),Size[1])) # increase size a bit along x
     3441        dlg.CenterOnParent()
    34423442        Rw = 100.00
    34433443        try:
    34443444            Rw = G2stMn.Refine(self.GSASprojectfile,dlg)
    34453445        finally:
     3446            dlg.Update(101.) # forces the Auto_Hide; needed after move w/Win & wx3.0
    34463447            dlg.Destroy()
    34473448            wx.Yield()
     
    35073508            return
    35083509        dlg = wx.ProgressDialog('Residual for histogram 0','Powder profile Rwp =',101.0,
    3509             style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
    3510         screenSize = wx.ClientDisplayRect()
     3510            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT,
     3511            parent=self)           
    35113512        Size = dlg.GetSize()
    3512         Size = (int(Size[0]*1.2),Size[1]) # increase size a bit along x
    3513         dlg.SetPosition(wx.Point(screenSize[2]-Size[0]-305,screenSize[1]+5))
    3514         dlg.SetSize(Size)
     3513        if 50 < Size[0] < 500: # sanity check on size, since this fails w/Win & wx3.0
     3514            dlg.SetSize((int(Size[0]*1.2),Size[1])) # increase size a bit along x
     3515        dlg.CenterOnParent()
    35153516        try:
    35163517            G2stMn.SeqRefine(self.GSASprojectfile,dlg)
    35173518        finally:
    3518             dlg.Destroy()       
     3519            dlg.Update(101.) # forces the Auto_Hide; needed after move w/Win & wx3.0
     3520            dlg.Destroy()
     3521            wx.Yield()
    35193522        dlg = wx.MessageDialog(self,'Load new result?','Refinement results',wx.OK|wx.CANCEL)
    35203523        try:
  • trunk/GSASIIstrMath.py

    r1562 r1591  
    21662166            dMdvh *= Wt
    21672167            if dlg:
    2168                 dlg.Update(Histogram['Residuals']['wR'],newmsg='Hessian for histogram %d\nAll data Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))[0]
     2168                dlg.Update(Histogram['Residuals']['wR'],newmsg='Hessian for histogram %d\nAll data Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
    21692169            if len(Hess):
    21702170                Hess += np.inner(dMdvh,dMdvh)
Note: See TracChangeset for help on using the changeset viewer.