Ticket #5603 (closed: fixed)
Invoking CustomSetup for DiffSphere duplicates the DiffSphere function
Reported by: | Jose Borreguero | Owned by: | Jose Borreguero |
---|---|---|---|
Priority: | major | Milestone: | Release 2.3 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Roman Tolchenov |
Description
In the "Fit Function" browser: Setup -> Custom Setup -> ds, (where ds stores a DiffSphere fitting function) produces two DiffSphere fitting functions, the one stored and one additional.
I believe this is due to the fact that saving a fit function invokes asString(), thus storing a string representation of the fit function. The inverse step, obtaining the fit function for the string representation invokes iteratively the constructor for each function. The DiffSphere constructor calls the InelasticSphere and the ElasticSphere constructor, thus creating an additional DiffSphere pair.
Change History
comment:2 Changed 8 years ago by Jose Borreguero
Roman will implement an InmutableCompositeFunction that will override asString() such that the member functions will not be printed. This will prevent duplication of the member functions when creating a DiffSphere function from such a string.
comment:4 Changed 8 years ago by Jose Borreguero
Refs #5603 Q as attribute, inherit from immutableComposite
modified: CMakeLists.txt, BackToBackExponential.h, DiffSphere.h,
BackToBackExponential.cpp, DiffSphere.cpp
Changeset: 3d5ac9b7bf439d2e6490e43d24561dc3d57c49e3
comment:5 Changed 8 years ago by Jose Borreguero
- Status changed from accepted to verify
- Resolution set to fixed
DiffSphere now inherits correctly from ImmutableComposite function
comment:6 Changed 8 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:7 Changed 8 years ago by Roman Tolchenov
- Status changed from verifying to closed
DiffSphere works with the MantidPlot's fit browser.
comment:8 Changed 8 years ago by Jose Borreguero
Refs #5603 Q as attribute, inherit from immutableComposite
modified: CMakeLists.txt, BackToBackExponential.h, DiffSphere.h,
BackToBackExponential.cpp, DiffSphere.cpp
Changeset: 3d5ac9b7bf439d2e6490e43d24561dc3d57c49e3