Changeset 50cafe7 in sasview


Ignore:
Timestamp:
Sep 8, 2018 4:50:05 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_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
76a0ffc
Parents:
2a174d4
git-author:
Piotr Rozyczko <rozyczko@…> (09/08/18 04:49:26)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/08/18 04:50:05)
Message:

Don't show constraint menu on parameter headers.

Location:
src/sas/qtgui
Files:
2 edited

Legend:

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

    r12db2db6 r50cafe7  
    952952        model = proxy.sourceModel() 
    953953 
    954         if index.isValid(): 
    955             model_item = model.itemFromIndex(proxy.mapToSource(index)) 
    956             # Find the mapped index 
    957             orig_index = model_item.isCheckable() 
    958             if orig_index: 
    959                 # Check the data to enable/disable actions 
    960                 is_2D = isinstance(GuiUtils.dataFromItem(model_item), Data2D) 
    961                 self.actionQuick3DPlot.setEnabled(is_2D) 
    962                 self.actionEditMask.setEnabled(is_2D) 
    963                 # Fire up the menu 
    964                 self.context_menu.exec_(self.current_view.mapToGlobal(position)) 
     954        if not index.isValid(): 
     955            return 
     956        model_item = model.itemFromIndex(proxy.mapToSource(index)) 
     957        # Find the mapped index 
     958        orig_index = model_item.isCheckable() 
     959        if not orig_index: 
     960            return 
     961        # Check the data to enable/disable actions 
     962        is_2D = isinstance(GuiUtils.dataFromItem(model_item), Data2D) 
     963        self.actionQuick3DPlot.setEnabled(is_2D) 
     964        self.actionEditMask.setEnabled(is_2D) 
     965        # Fire up the menu 
     966        self.context_menu.exec_(self.current_view.mapToGlobal(position)) 
    965967 
    966968    def showDataInfo(self): 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r12db2db6 r50cafe7  
    563563        When clicked on white space: model description 
    564564        """ 
    565         rows = [s.row() for s in self.lstParams.selectionModel().selectedRows()] 
     565        rows = [s.row() for s in self.lstParams.selectionModel().selectedRows() 
     566                if self.isCheckable(s.row())] 
    566567        menu = self.showModelDescription() if not rows else self.modelContextMenu(rows) 
    567568        try: 
Note: See TracChangeset for help on using the changeset viewer.