Changeset 3bdbfcc in sasview for src/sas/qtgui/GuiUtils.py
- Timestamp:
- Feb 2, 2017 6:29:07 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:
- 965fbd8
- Parents:
- 5d89f43
- git-author:
- Piotr Rozyczko <rozyczko@…> (01/23/17 07:21:03)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (02/02/17 06:29:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiUtils.py
ra66ff280 r3bdbfcc 242 242 assert isinstance(item, QtGui.QStandardItem) 243 243 assert isinstance(update_data, QtCore.QVariant) 244 py_update_data = update_data.toPyObject() 245 246 # Check if data with the same ID is already present 247 for index in range(item.rowCount()): 248 plot_item = item.child(index) 249 if plot_item.isCheckable(): 250 plot_data = plot_item.child(0).data().toPyObject() 251 if plot_data.id == py_update_data.id: 252 item.removeRow(index) 253 break 244 254 245 255 checkbox_item = QtGui.QStandardItem(True) … … 249 259 250 260 # Add "Info" item 251 py_update_data = update_data.toPyObject()252 261 if isinstance(py_update_data, (Data1D or Data2D)): 253 262 # If Data1/2D added - extract Info from it … … 298 307 if item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 299 308 # TODO: assure item type is correct (either data1/2D or Plotter) 300 plot_data.append( item.child(0).data().toPyObject())309 plot_data.append((item, item.child(0).data().toPyObject())) 301 310 # Going 1 level deeper only 302 311 for index_2 in range(item.rowCount()): … … 304 313 if item_2 and item_2.isCheckable() and item_2.checkState() == QtCore.Qt.Checked: 305 314 # TODO: assure item type is correct (either data1/2D or Plotter) 306 plot_data.append( item_2.child(0).data().toPyObject())315 plot_data.append((item_2, item_2.child(0).data().toPyObject())) 307 316 308 317 return plot_data
Note: See TracChangeset
for help on using the changeset viewer.