Changeset d38d0042 in sasview
- Timestamp:
- Apr 21, 2011 6:33:18 PM (14 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:
- cefb3fb
- Parents:
- 2657df9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r2a62d5c rd38d0042 1254 1254 if self._default_save_location == None: 1255 1255 self._default_save_location = os.getcwd() 1256 1256 1257 plug_wlist = self._on_open_state_app_helper() 1257 1258 dlg = wx.FileDialog(self, 1258 1259 "Choose a file", 1259 1260 self._default_save_location, "", 1260 PLUGINS_WLIST)1261 plug_wlist) 1261 1262 if dlg.ShowModal() == wx.ID_OK: 1262 1263 path = dlg.GetPath() … … 1265 1266 dlg.Destroy() 1266 1267 self.load_state(path=path) 1267 1268 1269 def _on_open_state_app_helper(self): 1270 """ 1271 Helps '_on_open_state_application()' to find the extension of 1272 the current perspective/application 1273 """ 1274 # No current perspective or no extension attr 1275 if self._current_perspective is None: 1276 return PLUGINS_WLIST 1277 try: 1278 # Find the extension of the perspective and get that as 1st item in list 1279 ind = None 1280 app_ext = self._current_perspective._extensions 1281 plug_wlist = config.PLUGINS_WLIST 1282 for ext in set(plug_wlist): 1283 if ext.count(app_ext) > 0: 1284 ind = ext 1285 break 1286 # Found the extension 1287 if ind != None: 1288 plug_wlist.remove(ind) 1289 plug_wlist.insert(0, ind) 1290 try: 1291 plug_wlist ='|'.join(plug_wlist) 1292 except: 1293 plug_wlist = '' 1294 except: 1295 plug_wlist = PLUGINS_WLIST 1296 1297 return plug_wlist 1298 1268 1299 def _on_open_state_project(self, event): 1269 1300 """ … … 1272 1303 if self._default_save_location == None: 1273 1304 self._default_save_location = os.getcwd() 1274 1305 1275 1306 dlg = wx.FileDialog(self, 1276 1307 "Choose a file", 1277 1308 self._default_save_location, "", 1278 1309 APPLICATION_WLIST) 1310 print dlg.GetFilterIndex() 1279 1311 if dlg.ShowModal() == wx.ID_OK: 1280 1312 path = dlg.GetPath()
Note: See TracChangeset
for help on using the changeset viewer.