Changeset 96e8e39 in sasview for src


Ignore:
Timestamp:
Sep 24, 2018 3:05:14 AM (6 years ago)
Author:
rozyczko <piotrrozyczko@…>
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:
7879745
Parents:
3717470
Message:

Don't assume all perspectives have 'title' attribute. Some may only have
the standard 'windowTitle'

File:
1 edited

Legend:

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

    r30bed93 r96e8e39  
    385385        # Which perspective has been selected? 
    386386        if len(selected_items) > 1 and not self._perspective().allowBatch(): 
    387             msg = self._perspective().title() + " does not allow multiple data." 
     387            if hasattr(self._perspective(), 'title'): 
     388                title = self._perspective().title() 
     389            else: 
     390                title = self._perspective().windowTitle() 
     391            msg = title + " does not allow multiple data." 
    388392            msgbox = QtWidgets.QMessageBox() 
    389393            msgbox.setIcon(QtWidgets.QMessageBox.Critical) 
Note: See TracChangeset for help on using the changeset viewer.