Ignore:
Timestamp:
Dec 14, 2016 5:41:30 AM (7 years ago)
Author:
wojciech
Branches:
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
Children:
0ba0774
Parents:
abc5e70
Message:

A few fixes after code review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/SlitSizeCalculator.py

    rab9984e r886d2f2c  
    8989        self.close() 
    9090 
     91    def clearResults(self): 
     92        """ 
     93        Clear the content of output LineEdits 
     94        """ 
     95        self.slit_length_out.setText("ERROR!") 
     96        self.unit_out.clear() 
     97 
    9198    def calculateSlitSize(self, data=None): 
    9299        """ 
     
    95102 
    96103        if data is None: 
     104            self.clearResults() 
    97105            msg = "ERROR: Data hasn't been loaded correctly" 
    98106            raise RuntimeError, msg 
    99107 
    100108        if data.__class__.__name__ == 'Data2D': 
     109            self.clearResults() 
    101110            msg = "Slit Length cannot be computed for 2D Data" 
    102             raise Exception, msg 
     111            raise RuntimeError, msg 
    103112 
    104113        #compute the slit size 
     
    113122            slit_length = slit_length_calculator.calculate_slit_length() 
    114123        except: 
     124            self.clearResults() 
    115125            msg = "Slit Size Calculator: %s" % (sys.exc_value) 
    116126            raise RuntimeError, msg 
Note: See TracChangeset for help on using the changeset viewer.