- Timestamp:
- Apr 15, 2009 2:30:19 PM (16 years ago)
- 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:
- 60132ef
- Parents:
- 998b6b8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter1D.py
r7959f297 r6063b16 11 11 12 12 import wx 13 import sys 13 import sys, os 14 14 import pylab, time 15 15 … … 65 65 ## Action IDs for internal call-backs 66 66 self.action_ids = {} 67 ## Default locations 68 self._default_save_location = os.getcwd() 67 69 ## Graph 68 70 self.graph = Graph() … … 368 370 datainfo= self.plots[self.graph.selected_plottable].info 369 371 reader.write( path, datainfo) 372 373 try: 374 self._default_save_location = os.path.dirname(path) 375 except: 376 pass 377 370 378 return 371 379 … … 407 415 408 416 out.close() 409 417 try: 418 self._default_save_location = os.path.dirname(path) 419 except: 420 pass 410 421 411 422 def _onSave(self, evt): … … 421 432 wildcard = "Text files (*.txt)|*.txt|"\ 422 433 "CanSAS 1D files(*.xml)|*.xml" 423 424 dlg = wx.FileDialog(self, "Choose a file", os.getcwd(), "",wildcard , wx.SAVE)434 dlg = wx.FileDialog(self, "Choose a file", 435 self._default_save_location, "",wildcard , wx.SAVE) 425 436 426 437 if dlg.ShowModal() == wx.ID_OK: … … 431 442 if os.path.splitext(mypath)[1].lower() ==".xml": 432 443 self._onSaveXML(path) 433 444 434 445 dlg.Destroy() 435 446
Note: See TracChangeset
for help on using the changeset viewer.