xraylarch
xraylarch copied to clipboard
[xas_viewer] settings not kept when switching groups
When switching from one group to another some settings are lost:
- Normalization panel: the Victoreen order is resetted to default, not kept to the chosen value:
- load groupA and groupB
- click on groupA and change Victoreen order to 1
- click on groupB -> OK Victoreen order is 0 (default)
- click back on groupA -> BUG the Victoreen order is 0 (default), should be 1
- Linear combo panel: fit range resetted to default
- click on groupA and change the fit range, then fit the group with some components
- click on groupB -> OK the fit range is back to default
- click back on groupA -> BUG the fit range is the default one
@newville I wanted to fix this by myself, but I got lost in the Wx GUI. Please, could you tell me what is the method that is called when clicking on a Group in the list of groups panel?
PS: by the way on Linux and WSL there is still this annoying problem that the highlight of the selected group is lost as soon one clicks on the plot window. Then one has to look at the title in the main window to know what is the current highlighted group. Any news if this can be solved? Or is possible to use another method to highlight the current group in the list of groups?
@maurov
For 1: In xasnorm_panel there are basically "read_form()" and "process()" methods - I would guess the problem with victoreen order (nvict
) is there, somewhere....
For 2: probably the "fit range" is just not being set for the group (groupA) before the fit... Again there should basically be "read_form" and "process". There will also be "fill_form", meaning "fill the form from the current group configuration".
For the "loss of highlight" in the File List : I'll look again, but if I recall it was a pretty low-level wxPython setting and that there just wasn't a setting that worked. I'll look again, but I'm not 100% sure how easy this is to fix.
For the "loss of highlight" in the File List : I'll look again, but if I recall it was a pretty low-level wxPython setting and that there just wasn't a setting that worked. I'll look again, but I'm not 100% sure how easy this is to fix.
Yes, this is a low-level wxPython limitation. Would then be possible to add a behavior to put in "bold" the group which is highlighted? I mean, we keep the current "background highlight", which is working for Mac and Windows and we add the "bold highlight" on the group name, which should be visible on Linux (I hope!).
@maurov
Yes, this is a low-level wxPython limitation. Would then be possible to add a behavior to put in "bold" the group which is highlighted? I mean, we keep the current "background highlight", which is working for Mac and Windows and we add the "bold highlight" on the group name, which should be visible on Linux (I hope!).
I'm not sure.... I'll look again, but I think I basically hit a dead end the last time I looked.
FWIW, I do have "preserving nvict" fixed. I'm looking into and hoping to fix "energy ranges". Once those are done, I will probably tag and push 0.9.71 -- there were sort of a lot of people who needed "hot fixes". Hopefully by this weekend.
FWIW, I do have "preserving nvict" fixed. I'm looking into and hoping to fix "energy ranges". Once those are done, I will probably tag and push 0.9.71 -- there were sort of a lot of people who needed "hot fixes". Hopefully by this weekend.
Great, thanks! I have seen https://github.com/xraypy/xraylarch/commit/046f62e9b8e9b3596ef4c42f5ca79de1f2f48fd8
@maurov, I think these are both fixed in 0.9.71.
@maurov, I think these are both fixed in 0.9.71.
@newville, thanks for working on these. Bug 1 is fixed, but bug 2 is still there (tested only on WSL).
@maurov OK, thanks. I looked at this again. For me, the fitting ranges are remembered for a group once a fit has been done. Changing the value without doing a fit does appear to not automatically push that value to the "saved configuration", but doing a fit does.
This should be fixed to set the configuration value as soon as the value is changed. But at least the fit remembers the range now.
@newville thanks, I understand now. Indeed, I did the test without doing a fit.
On Fri, Jul 7, 2023, 2:29 PM Matt Newville @.***> wrote:
@maurov https://github.com/maurov OK, thanks. I looked at this again. For me, the fitting ranges are remembered for a group once a fit has been done. Changing the value without doing a fit does appear to not automatically push that value to the "saved configuration", but doing a fit does.
This should be fixed to set the configuration value as soon as the value is changed. But at least the fit remembers the range now.
— Reply to this email directly, view it on GitHub https://github.com/xraypy/xraylarch/issues/449#issuecomment-1625344804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFEDRB4MUV62H22KR5WGTXO76LTANCNFSM6AAAAAAZRS4Z6U . You are receiving this because you were mentioned.Message ID: @.***>
@maurov but we should still fix that...