Changeset 1591 for trunk/GSASII.py


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

fix progress dialog problems; remove cruft from GSASII.BAT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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:
Note: See TracChangeset for help on using the changeset viewer.