duderstadt-lab / mars-fx

BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Refreshing issues tag widget Rover #45

Closed NadiaHuisjes closed 2 years ago

NadiaHuisjes commented 3 years ago

I encountered refreshing issues with the tag widget in Rover. After running scripts introducing tags to my data, the tags were only displayed correctly in the diagram after running the script for the first time. After running tagging script 2, the widget displayed the wrong axes labels and the refreshing button could not be pressed anymore. Closing the widget, removing all tags from the archive, then running the tagging scripts again and loading the widget freshly solved the issue.

In the screenshot below you can see the wrong axes labels that were displayed. The search for one of the tags correctly displayed that there were only 5 traces tagged 'DO_active' whereas the widget displayed a bar corresponding to over 25 molecules.

Screenshot 2021-06-25 at 12 00 11 Screenshot 2021-06-25 at 12 00 06
karlduderstadt commented 2 years ago

Unfortunately I have not been able to reproduce this problem. I think I must not have done the correct sequence of things. It sounds like the tag widget basically crashed and after that it was not correct because it couldn't be updated. I will keep trying to see if I have the same problem and can fix it. Thanks for reporting this!!

karlduderstadt commented 2 years ago

Ah! I think I have found this issue now as well. For me, I deleted a molecule that was tagged with remove but no matter what I do, I still see it in the tags widget... Clearly there is something wrote with how this is updating. I will investigate further

I guess it only took a year... almost to the day 😢 😆

karlduderstadt commented 2 years ago

The issue I encountered is now resolved. Basically, if you have a molecule record selected and you then delete it using the Delete molecule item in the menus, the contents of the molecule record would still be displayed. Even worse, if you switched tabs and then switched back, the record was added back into the archive.

Now all references to the deleted molecule record are removed and all the molecule record fields are cleared if the currently selected record is deleted. Just for completeness, when deletes sets of molecule that were not actively selected during deletion, there was never a problem.

I am not sure if this resolve the original issue. One thing I did notice is that the tag widget will update with the reload rotating because it is very fast. So I don't think it was not updating. In all cases, it was reflecting the set of current molecule tags. Also, when not in virtual mode, there is no indexing. This mean the tag counts are created again by looking at all records, so over all I am really puzzled.

I am going to close this issue for because as far as I can see the main problem was solved. However, we can certainly reopen the issue at a later time if this issue comes up again.

One final thought, I wonder if somehow there was actually an error in the molecule index that didn't show all the tagged molecules, this could explain the confusion.. Hmm.. 🤔