Changeset 50cafe7 in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Sep 8, 2018 4:50:05 AM (6 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r12db2db6 r50cafe7 952 952 model = proxy.sourceModel() 953 953 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)) 965 967 966 968 def showDataInfo(self):
Note: See TracChangeset
for help on using the changeset viewer.