Changeset 2109 for trunk/exports


Ignore:
Timestamp:
Dec 26, 2015 10:22:09 PM (6 years ago)
Author:
toby
Message:

Andrey's enhancement: keep track of last GPX, import & export directories; optionally save the 1st two

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_CIF.py

    r1831 r2109  
    22352235    def _onSave(self,event):
    22362236        'Save CIF entries in a template file'
     2237        pth = G2G.GetExportPath(self.G2frame)
    22372238        dlg = wx.FileDialog(
    22382239            self, message="Save as CIF template",
    2239             defaultDir=os.getcwd(),
     2240            defaultDir=pth,
    22402241            defaultFile=self.defaultname,
    22412242            wildcard="CIF (*.cif)|*.cif",
    2242             style=wx.SAVE | wx.CHANGE_DIR
    2243             )
     2243            style=wx.SAVE)
    22442244        val = (dlg.ShowModal() == wx.ID_OK)
    22452245        fil = dlg.GetPath()
     
    25502550    def _onGetTemplateFile(self,event):
    25512551        'select a template file'
     2552        pth = G2G.GetImportPath(self.G2frame)
     2553        if not pth: pth = '.'
    25522554        dlg = wx.FileDialog(
    25532555            self.cifdefs, message="Read CIF template file",
    2554             defaultDir=os.getcwd(),
     2556            defaultDir=pth,
    25552557            defaultFile=self.defaultname,
    25562558            wildcard="CIF (*.cif)|*.cif",
    2557             style=wx.OPEN | wx.CHANGE_DIR
    2558             )
     2559            style=wx.OPEN)
    25592560        ret = dlg.ShowModal()
    25602561        fil = dlg.GetPath()
Note: See TracChangeset for help on using the changeset viewer.