Changeset 88e1f57 in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Oct 24, 2017 8:21:11 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, 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:
- 814a253
- Parents:
- d6b234b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
rf0bb711 r88e1f57 313 313 # Append the new row to the main item 314 314 item.appendRow(object_item) 315 316 def itemFromFilename(filename, model_item): 317 """ 318 Returns the model item text=filename in the model 319 """ 320 assert isinstance(model_item, QtGui.QStandardItemModel) 321 assert isinstance(filename, basestring) 322 323 # Iterate over model looking for named items 324 item = list(filter(lambda i: str(i.text()) == filename, 325 [model_item.item(index) for index in range(model_item.rowCount())])) 326 return item[0] if len(item)>0 else None 315 327 316 328 def plotsFromFilename(filename, model_item):
Note: See TracChangeset
for help on using the changeset viewer.