Changeset e20870bc in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
Jun 27, 2018 5:33:52 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, 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:
b1a7a81
Parents:
c5e0d84
git-author:
Piotr Rozyczko <rozyczko@…> (05/31/18 07:15:47)
git-committer:
Piotr Rozyczko <rozyczko@…> (06/27/18 05:33:52)
Message:

Masking dialog for fitting

File:
1 edited

Legend:

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

    raed0532 re20870bc  
    9191        self.communicator.activeGraphName.connect(self.updatePlotName) 
    9292        self.communicator.plotUpdateSignal.connect(self.updatePlot) 
     93        self.communicator.maskEditorSignal.connect(self.showEditDataMask) 
    9394 
    9495        self.cbgraph.editTextChanged.connect(self.enableGraphCombo) 
     
    990991        new_plot.show() 
    991992 
    992     def showEditDataMask(self): 
     993    def showEditDataMask(self, data=None): 
    993994        """ 
    994995        Mask Editor for 2D plots 
    995996        """ 
    996         index = self.current_view.selectedIndexes()[0] 
    997         proxy = self.current_view.model() 
    998         model = proxy.sourceModel() 
    999         model_item = model.itemFromIndex(proxy.mapToSource(index)) 
    1000  
    1001         data = GuiUtils.dataFromItem(model_item) 
     997        if data is None or not isinstance(data, Data2D): 
     998            index = self.current_view.selectedIndexes()[0] 
     999            proxy = self.current_view.model() 
     1000            model = proxy.sourceModel() 
     1001            model_item = model.itemFromIndex(proxy.mapToSource(index)) 
     1002 
     1003            data = GuiUtils.dataFromItem(model_item) 
    10021004 
    10031005        mask_editor = MaskEditor(self, data) 
Note: See TracChangeset for help on using the changeset viewer.