Changeset c4ae1c2 in sasview for invariantview


Ignore:
Timestamp:
Sep 9, 2011 2:15:01 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2f81957
Parents:
baf1ef3
Message:

correction: default folder for inv and pr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/src/sans/perspectives/invariant/invariant_panel.py

    rb8ff610 rc4ae1c2  
    9595        self.reset_panel() 
    9696        self._reset_state_list() 
    97          
     97        ## Default file location for save 
     98        self._default_save_location = os.getcwd()         
    9899        if self.parent is not None: 
    99100            msg = "" 
    100101            wx.PostEvent(self.parent,StatusEvent(status=msg, info="info")) 
    101              
    102         ## Default file location for save 
    103         self._default_save_location = os.getcwd() 
     102            self._default_save_location =\ 
     103                        self.parent._default_save_location 
     104         
    104105        self._set_bookmark_flag(False) 
    105106     
     
    11731174        # Ask the user the location of the file to write to. 
    11741175        path = None 
     1176        if self.parent != None: 
     1177            self._default_save_location =\ 
     1178             self.parent._default_save_location 
     1179        if self._default_save_location == None: 
     1180            self._default_save_location = os.getcwd() 
    11751181        dlg = wx.FileDialog(self, "Choose a file", 
    1176                             self._default_save_location, "", "*.inv", wx.SAVE) 
     1182                            self._default_save_location, \ 
     1183                            self.window_caption, "*.inv", wx.SAVE) 
    11771184        if dlg.ShowModal() == wx.ID_OK: 
    11781185            path = dlg.GetPath() 
    11791186            self._default_save_location = os.path.dirname(path) 
     1187            if self.parent != None: 
     1188                self.parent._default_save_location =\ 
     1189                    self._default_save_location 
    11801190        else: 
    11811191            return None 
Note: See TracChangeset for help on using the changeset viewer.