Changes in src/sas/qtgui/Utilities/GuiUtils.py [5d28d6b:9ce69ec] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
r5d28d6b r9ce69ec 322 322 assert isinstance(item, QtGui.QStandardItem) 323 323 324 # lists of plots names/ids for all deletable plots on item 324 325 names = [p.name for p in new_plots if p.name is not None] 325 326 ids = [p.id for p in new_plots if p.id is not None] … … 329 330 for index in range(item.rowCount()): 330 331 plot_item = item.child(index) 331 if plot_item.isCheckable(): 332 plot_data = plot_item.child(0).data() 333 if (plot_data.id is not None) and (plot_data.id not in ids) and (plot_data.name not in names): 334 items_to_delete.append(plot_item) 332 if not plot_item.isCheckable(): 333 continue 334 plot_data = plot_item.child(0).data() 335 if (plot_data.id is not None) and \ 336 (plot_data.id not in ids) and \ 337 (plot_data.name not in names) and \ 338 (plot_data.plot_role == Data1D.ROLE_DELETABLE): 339 items_to_delete.append(plot_item) 335 340 336 341 for plot_item in items_to_delete: … … 562 567 The assumption - data stored in SasView standard, in child 0 563 568 """ 564 return item.child(0).data() 569 try: 570 data = item.child(0).data() 571 except AttributeError: 572 data = None 573 return data 565 574 566 575 def openLink(url):
Note: See TracChangeset
for help on using the changeset viewer.