Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rd3911e3 r62243ae  
    152152SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT 
    153153SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME 
     154SAS_OPENCL = config.SAS_OPENCL 
    154155if not WELCOME_PANEL_ON: 
    155156    WELCOME_PANEL_SHOW = False 
     
    176177    else: 
    177178        DEFAULT_OPEN_FOLDER = PATH_APP 
     179    SAS_OPENCL = custom_config.SAS_OPENCL 
    178180except: 
    179181    DATALOADER_SHOW = True 
     
    190192    CLEANUP_PLOT = False 
    191193    DEFAULT_OPEN_FOLDER = PATH_APP 
    192  
     194    SAS_OPENCL = None 
    193195DEFAULT_STYLE = config.DEFAULT_STYLE 
    194196 
     
    225227        CHILD_FRAME = wx.Frame 
    226228 
     229#Initiliaze enviromental variable with custom setting but only if variable not set 
     230if SAS_OPENCL and not "SAS_OPENCL" in os.environ: 
     231    os.environ["SAS_OPENCL"] = SAS_OPENCL 
    227232 
    228233class ViewerFrame(PARENT_FRAME): 
     
    19501955                    item, _, _ = value 
    19511956                    item.Check(True) 
    1952             self._data_panel.on_remove(None, False) 
    19531957 
    19541958            wx.PostEvent(self, StatusEvent(status="Loading Project file...")) 
     
    19631967                # Reset to a base state 
    19641968                self._on_reset_state() 
     1969                self._data_panel.on_remove(None, False) 
    19651970                # Load the project file 
    19661971                self.load_state(path=path, is_project=True) 
     
    19901995                wx.PostEvent(self, 
    19911996                             StatusEvent(status="Completed saving.")) 
    1992             except Exception: 
     1997            except: 
    19931998                msg = "Error occurred while saving: " 
    1994                 msg += traceback.format_exc() 
    19951999                msg += "To save, the application panel should have a data set.." 
    19962000                wx.PostEvent(self, StatusEvent(status=msg)) 
     
    20412045                logging.warning(msg) 
    20422046                wx.PostEvent(self, StatusEvent(status=msg, info="error")) 
    2043         except Exception: 
     2047        except: 
    20442048            msg = "Error occurred while saving: " 
    2045             msg += traceback.format_exc() 
    20462049            msg += "To save, at least one application panel " 
    20472050            msg += "should have a data set.." 
     
    24582461                                                group_id=group_id, 
    24592462                                                action='remove')) 
    2460                 # remove res plot: Todo: improve 
    24612463                wx.CallAfter(self._remove_res_plot, new_plot.id) 
    24622464        self._data_manager.delete_data(data_id=data_id, 
Note: See TracChangeset for help on using the changeset viewer.