CIRDLES / Squid

Squid3 is being developed by the Cyber Infrastructure Research and Development Lab for the Earth Sciences (CIRDLES.org) at the College of Charleston, Charleston, SC and Geoscience Australia as a re-implementation in Java of Ken Ludwig's Squid 2.5. - please contribute your expertise!
http://cirdles.org/projects/squid/
Apache License 2.0
12 stars 27 forks source link

Removing analyses #539

Closed AllenKennedy closed 3 years ago

AllenKennedy commented 3 years ago

Hi, If I open the same saved project multiple times and load up the data file each time, and then I remove the same unwanted analysis from the list of RM, it is recorded in the list of analyses I can restore. I can grow a list of restore analyses, even though I am only removing the one analysis. If I hit restore, I can end up with multiple copies of the removed analysis being inserted into the list of RM.

NicoleRayner commented 3 years ago

We can look into this, sounds like a bit of a bug. In the short term, the solution might be to create a new data file xml file that incorporates this edit (aka make a source xml file that doesn't contain this RM analysis at all) and then keep using that one for further processing). This is done under the Data menu --> Save project data as Prawn Data File.

AllenKennedy commented 3 years ago

Hi Nicole, There are plenty of work arounds and it isn't critical. I was just flagging what I thought was a bug that may puzzle a novice. Saving as a Prawn File is a good idea.

bowring commented 3 years ago

I don't understand the problem - please provide a video or more detailed steps that you are executing. In particular, I am not sure what you mean by opening the saved project and then loading the data.

bowring commented 3 years ago

I think @sbodorkos is able to replicate ... waiting for details.

sbodorkos commented 3 years ago

I was able to replicate the behaviour documented by @AllenKennedy, as follows:

  1. Open Squid Project, Navigate to the Manage Spots and Reference Materials window
  2. Right-click on a spot, and select Remove
  3. Close the Project without Saving, and re-open it (without quitting Squid3)

At this point, the Manage Spots and Reference Materials window contains a list of all the spots appearing in the XML file, because the Removal was not formalised via Save. However, the Remove/Restore function (available via right-click) in this window does retain a memory of the previous Removal, and pressing Restore does just that, creating a doppelganger of the removed spot in the overall spot-list (i.e. the duplicate is not recognised via "...dup" in the way a spot-label manually repeated by a user during analysis would be).

As Allen noted, this sequence of actions can be repeated from top to bottom, and the second time around, choosing "Restore all 2 removed spots" via right-click results in three identical spots in the spot-list.

I think there are two issues here:

  1. Obviously any given spot should be either in the retained spot-list or available for restore, but never both (and never neither). Possibly this window needs some sort of Save-prompt, but this would be at odds with most of the other windows, where user-changes are instantaneously propagated. Should we be refreshing all the calculations (beginning to end) automatically, every time a user preforms a Remove or a Restore?
  2. Possibly the Restore functionality needs to be strengthened. One way would be to have a "Removed Spots" category in the spot-list, next to "All Samples". When you chose "Removed Spots", you'd be able to see the spots that have been Removed, and choose which (if any) you'd like to Restore (rather than just Restoring all Removed spots as at present). Note also that at present, Restoring Removed spots is only possible prior to Saving your Squid3 project: if you Remove a spot and then Save your Project, you are powerless to Restore it should you change your mind later (unless you reload the original XML file into the Project).

My feeling is that Removing spots should (after Save) quarantine them from calculations in that Project, until the user decides to reinstate them via Restore. At present, spots that are Removed are exterminated on Save, and there's no way back, which is not ideal.

bowring commented 3 years ago

I am making a new issue to handle improvements suggested. The original bug is fixed.