Ignore:
Timestamp:
Sep 25, 2018 5:13:24 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
6923863
Parents:
8a09457
Message:

Complain when wrong data sent to perspective. SASVIEW-1165 SASVIEW-1166

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r96e8e39 r6ae7466  
    398398 
    399399        # Notify the GuiManager about the send request 
    400         self._perspective().setData(data_item=selected_items, is_batch=self.chkBatch.isChecked()) 
     400        try: 
     401            self._perspective().setData(data_item=selected_items, is_batch=self.chkBatch.isChecked()) 
     402        except Exception as ex: 
     403            msg = "%s perspective returned the following message: \n%s\n" %(self._perspective().name, str(ex)) 
     404            logging.error(msg) 
     405            msg = str(ex) 
     406            msgbox = QtWidgets.QMessageBox() 
     407            msgbox.setIcon(QtWidgets.QMessageBox.Critical) 
     408            msgbox.setText(msg) 
     409            msgbox.setStandardButtons(QtWidgets.QMessageBox.Ok) 
     410            retval = msgbox.exec_() 
     411 
    401412 
    402413    def freezeCheckedData(self): 
Note: See TracChangeset for help on using the changeset viewer.