- Timestamp:
- Nov 6, 2018 7:52:21 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- be74751
- Parents:
- 17e2d502
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r17e2d502 r490e230 365 365 return all_data 366 366 367 def getItemForID(self, id): 368 # return the model item with the given ID 369 item = None 370 for model in (self.model, self.theory_model): 371 for i in range(model.rowCount()): 372 properties = {} 373 item = model.item(i) 374 data = GuiUtils.dataFromItem(item) 375 if data is None: continue 376 if data.id != id: continue 377 # We found the item - return it 378 break 379 return item 380 367 381 def getAllData(self): 368 382 """ … … 430 444 If so, pull out relevant indices and recreate the batch page(s) 431 445 """ 432 batch_page_counter = 0433 # {counter:[[item1, item2,...], {properties}]}434 batch_page_dict = {}435 446 batch_pages = [] 436 447 for key, value in all_data.items(): … … 441 452 if page['is_batch_fitting'][0] != 'True': 442 453 continue 443 batch_ids = page['data_id'] 444 batch_pages.append(batch_ids) 445 # Now we have all batchpages in batch_pages. 446 # remove duplicates 447 #for page in batch_pages: 448 # if page in 454 batch_ids = page['data_id'][0] 455 # check for duplicates 456 batch_set = set(batch_ids) 457 if batch_set in batch_pages: 458 continue 459 # Found a unique batch page. Send it away 460 items = [self.getItemForID(i) for i in batch_set] 461 # Update the batch page list 462 batch_pages.append(batch_set) 463 # Assign parameters to the most recent (current) page. 464 self._perspective().setData(data_item=items, is_batch=True) 465 self._perspective().updateFromParameters(page) 466 467 pass 449 468 450 469 def updatePerspectiveWithProperties(self, key, value):
Note: See TracChangeset
for help on using the changeset viewer.