Changeset 6af5d75 in sasview


Ignore:
Timestamp:
Oct 25, 2018 10:08:00 AM (6 years ago)
Author:
Jeff Krzywon <jkrzywon@…>
Branches:
unittest-saveload
Children:
0863065
Parents:
08f921e
Message:

Don't start the SasView? main loop if running in threaded mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasview/sasview.py

    r1270e3c r6af5d75  
    3636    Main class for running the SasView application 
    3737    """ 
    38     def __init__(self): 
     38    def __init__(self, threaded=False): 
    3939        """ 
    4040        """ 
     
    129129        # delete unused model folder 
    130130        self.gui.clean_plugin_models(PLUGIN_MODEL_DIR) 
    131         # Start the main loop 
    132         self.gui.MainLoop() 
     131        if not threaded: 
     132            # Start the main loop 
     133            self.gui.MainLoop() 
    133134 
    134135    def check_sasmodels_compiler(self): 
     
    264265        os.environ["SAS_OPENCL"] = SAS_OPENCL 
    265266 
    266 def run_gui(): 
     267 
     268def run_gui(threaded=False): 
    267269    """ 
    268270    __main__ method for loading and running SasView 
     
    274276    setup_sasmodels() 
    275277    setup_wx() 
    276     SasView() 
     278    app = SasView(threaded=threaded) 
     279    return app 
    277280 
    278281 
Note: See TracChangeset for help on using the changeset viewer.