Changeset 722b7d6 in sasview


Ignore:
Timestamp:
Oct 29, 2018 4:34:53 AM (5 years ago)
Author:
piotr
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:
ec4a143
Parents:
75906a1
Message:

Minor changes after PK's CR + minor refactoring.

Location:
src/sas/qtgui
Files:
4 edited

Legend:

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

    r6bc0840 r722b7d6  
    364364        pass 
    365365 
    366     def sendData(self, event): 
     366    def sendData(self, event=None): 
    367367        """ 
    368368        Send selected item data to the current perspective and set the relevant notifiers 
     
    11711171        Mask Editor for 2D plots 
    11721172        """ 
     1173        msg = QtWidgets.QMessageBox() 
     1174        msg.setIcon(QtWidgets.QMessageBox.Information) 
     1175        msg.setText("Error: cannot apply mask.\n"+ 
     1176                    "Please select a 2D dataset.") 
     1177        msg.setStandardButtons(QtWidgets.QMessageBox.Ok) 
     1178 
    11731179        try: 
    11741180            if data is None or not isinstance(data, Data2D): 
     1181                # if data wasn't passed - try to get it from 
     1182                # the currently selected item 
    11751183                index = self.current_view.selectedIndexes()[0] 
    11761184                proxy = self.current_view.model() 
     
    11811189 
    11821190            if data is None or not isinstance(data, Data2D): 
    1183                 msg = QtWidgets.QMessageBox() 
    1184                 msg.setIcon(QtWidgets.QMessageBox.Information) 
    1185                 msg.setText("Error: cannot apply mask. \ 
    1186                                 Please select a 2D dataset.") 
    1187                 msg.setStandardButtons(QtWidgets.QMessageBox.Cancel) 
     1191                # If data is still not right, complain 
    11881192                msg.exec_() 
    11891193                return 
    11901194        except: 
    1191             msg = QtWidgets.QMessageBox() 
    1192             msg.setIcon(QtWidgets.QMessageBox.Information) 
    1193             msg.setText("Error: No dataset selected. \ 
    1194                             Please select a 2D dataset.") 
    1195             msg.setStandardButtons(QtWidgets.QMessageBox.Cancel) 
    11961195            msg.exec_() 
    11971196            return 
  • src/sas/qtgui/MainWindow/GuiManager.py

    r8748751 r722b7d6  
    1010from PyQt5.QtGui import * 
    1111from PyQt5.QtCore import Qt, QLocale, QUrl 
     12 
     13import matplotlib as mpl 
     14mpl.use("Qt5Agg") 
    1215 
    1316from twisted.internet import reactor 
  • src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py

    r906e0c7 r722b7d6  
    1313        Overwrite generic constructor to allow for some globals 
    1414        """ 
    15         super(QtWidgets.QStyledItemDelegate, self).__init__() 
     15        super(ModelViewDelegate, self).__init__() 
    1616 
    1717        # Main parameter table view columns 
     
    125125        Overwrite generic constructor to allow for some globals 
    126126        """ 
    127         super(QtWidgets.QStyledItemDelegate, self).__init__() 
     127        super(PolyViewDelegate, self).__init__() 
    128128 
    129129        self.poly_parameter = 0 
     
    226226        Overwrite generic constructor to allow for some globals 
    227227        """ 
    228         super(QtWidgets.QStyledItemDelegate, self).__init__() 
     228        super(MagnetismViewDelegate, self).__init__() 
    229229 
    230230        self.mag_parameter = 0 
  • src/sas/qtgui/Plotting/Plotter2D.py

    r8fad50b r722b7d6  
    99 
    1010 
    11 #import sys 
    12 #print("SYS.PATH = ", sys.path) 
    1311import matplotlib as mpl 
    14 mpl.use("Qt5Agg") 
    1512DEFAULT_CMAP = mpl.cm.jet 
    1613 
Note: See TracChangeset for help on using the changeset viewer.