Conversation
… widget refactor to ensure PD plots and math are correct
|
#3741 seems to be a related issue? |
rozyczko
left a comment
There was a problem hiding this comment.
Looks and behaves as expected with the caveat explained below
| self.poly_model.item(row, 5+joffset).setText(param_repr) | ||
| # Function | ||
| param_repr = param_dict[param_name][6+ioffset] | ||
| self.poly_model.item(row, 6+joffset).setText(param_repr) |
There was a problem hiding this comment.
Setting the text on the combobox is not necessary.
Column 6 always contains a combo box (addNameToPolyModel)
There was a problem hiding this comment.
I had to add this, otherwise the combo box was never updated when loading projects or changing models.
|
This fixes the immediate issue of the combobox state not being restored on model change. However, there's another issue here that needs addressing at some point. The table headers are correctly not displaying the error, but the parameter values still contain the error column. |
Description
This restores some of the code changed during the fitting widget refactor (#3169) to ensure the PD plots are correct when switching models, in any way. This 2nd commit (7c0569c) restores the PD function on model change, which wasn't present before.
Fixes #3500
(Possibly?)Fixes #3248(Possibly?)Fixes #2540(Possibly?)Fixes #1587(Possibly?)Fixes #3506How Has This Been Tested?
I repeated the steps in #3500, selecting schultz and switching between sphere and core_shell_sphere. The PD distribution is nominally correct, and the PD function remains as schulz. I also added and changed the structure factor and the function remained schultz for each S(Q) change.
I have NOT tested loading a project, but this is the same method called during the project load process, so I am guessing this may also fix the issues related to that.
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)