Changeset 9e6c27f in sasview


Ignore:
Timestamp:
Apr 18, 2009 4:33:22 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d0ce2c30
Parents:
eda428b
Message:

sansview: fixed the problem with array references being lost when using a dispersed model within a thread. To-the-point 3-liner hack. Design needs to be reviewed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    r5812a55 r9e6c27f  
    300300                    # Set the new model as the dispersion object for the selected parameter 
    301301                    self.model.set_dispersion(p, disp_model) 
    302                            
     302                    # Store a reference to the weights in the model object so that 
     303                    # it's not lost when we use the model within another thread. 
     304                    #TODO: total hack - fix this 
     305                    if not hasattr(self.model, "_persistency_dict"): 
     306                        self.model._persistency_dict = {} 
     307                    self.model._persistency_dict[p] = [values, weights] 
    303308                else: 
    304309                    # The parameter was un-selected. Go back to Gaussian model (with 0 pts) 
Note: See TracChangeset for help on using the changeset viewer.