Changeset 273 for trunk/GSASII.py


Ignore:
Timestamp:
May 2, 2011 5:16:06 PM (11 years ago)
Author:
vondreele
Message:

output of S(Q) and G(R) as files for other use
some effort to fix graphics tab behavior

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r271 r273  
    12361236    def OnExportPDF(self,event):
    12371237        #need S(Q) and G(R) to be saved here - probably best from selection?
    1238         event.Skip()
     1238        names = ['All']
     1239        exports = []
     1240        item, cookie = self.PatternTree.GetFirstChild(self.root)
     1241        while item:
     1242            name = self.PatternTree.GetItemText(item)
     1243            if 'PDF' in name:
     1244                names.append(name)
     1245            item, cookie = self.PatternTree.GetNextChild(self.root, cookie)
     1246        if names:
     1247            dlg = wx.MultiChoiceDialog(self,'Select','PDF patterns to export',names)
     1248            if dlg.ShowModal() == wx.ID_OK:
     1249                sel = dlg.GetSelections()
     1250                if sel[0] == 0:
     1251                    exports = names[1:]
     1252                else:
     1253                    for x in sel:
     1254                        exports.append(names[x])
     1255            dlg.Destroy()
     1256        if exports:
     1257            G2IO.PDFSave(self,exports)
    12391258       
    12401259    def OnExportPhase(self,event):
Note: See TracChangeset for help on using the changeset viewer.