Changeset c553b18 in sasview for sansguiframe


Ignore:
Timestamp:
Sep 9, 2011 1:21:48 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:
baf1ef3
Parents:
8dcc4539
Message:

remember the last folder opened/saved

Location:
sansguiframe/src/sans/guiframe
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    redcb00bd rc553b18  
    15711571            error_message += str(sys.exc_value) + "\n" 
    15721572            print error_message 
    1573         print "_default_save_location", self._default_save_location   
     1573  
    15741574    def load_folder(self, path): 
    15751575        """ 
     
    16781678        """ 
    16791679        ## Default file location for save 
    1680         self._default_save_location = os.getcwd() 
     1680        #self._default_save_location = os.getcwd() 
    16811681        if self._current_perspective is  None: 
    16821682            return 
  • sansguiframe/src/sans/guiframe/local_perspectives/data_loader/data_loader.py

    rd72ef56 rc553b18  
    8383        """ 
    8484        path = None 
     85        self._default_save_location = self.parent._default_save_location 
    8586        if self._default_save_location == None: 
    8687            self._default_save_location = os.getcwd() 
     
    123124        """ 
    124125        path = None 
     126        self._default_save_location = self.parent._default_save_location 
    125127        if self._default_save_location == None: 
    126128            self._default_save_location = os.getcwd() 
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py

    r36288ca rc553b18  
    8080        self.x_size = None 
    8181        ## Default locations 
    82         self._default_save_location = os.getcwd()  
     82        #self._default_save_location = os.getcwd()  
    8383        self.size = None        
    8484        ## Graph         
     
    620620            try: 
    621621                self._default_save_location = os.path.dirname(path) 
     622                self.parent._default_save_location = self._default_save_location 
    622623            except: 
    623624                pass     
     
    633634        path = None 
    634635        wildcard = "Text files (*.txt)|*.txt|"\ 
    635         "CanSAS 1D files(*.xml)|*.xml"  
     636                    "CanSAS 1D files(*.xml)|*.xml"  
     637        default_name = self.plots[self.graph.selected_plottable].label 
     638        if default_name.count('.') > 0: 
     639            default_name = default_name.split('.')[0] 
     640        default_name += "_out" 
     641        if self.parent != None: 
     642            self._default_save_location = self.parent._default_save_location 
    636643        dlg = wx.FileDialog(self, "Choose a file", 
    637644                            self._default_save_location, 
    638                              "", wildcard , wx.SAVE) 
     645                            default_name, wildcard , wx.SAVE) 
    639646        
    640647        if dlg.ShowModal() == wx.ID_OK: 
     
    673680            try: 
    674681                self._default_save_location = os.path.dirname(path) 
     682                self.parent._default_save_location = self._default_save_location 
    675683            except: 
    676684                pass     
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py

    r36288ca rc553b18  
    746746        """ 
    747747        id = str(evt.GetId()) 
     748        if self.parent != None: 
     749            self._default_save_location = self.parent._default_save_location 
    748750        if id in self.action_ids:          
    749751             
     
    784786                try: 
    785787                    self._default_save_location = os.path.dirname(path) 
     788                    self.parent._default_save_location = \ 
     789                                            self._default_save_location  
    786790                except: 
    787791                    pass     
Note: See TracChangeset for help on using the changeset viewer.