Drag-and-drop tag assignment does not deselect existing tags

Dragging and dropping a larva along part of its trajectory to assign a tag at every time points actually pushes the desired tag first in a priority list, instead of replacing the existing tags. The full priority lists can be found in the exported labels file.

While this behavior is understandable when "Multiple tags per time step" is checked (although debatable), it is clearly undesirable otherwise, as no visual clue lets the user know about the trailing tags.

A few considerations to be kept in mind:

  • trx.mat files already exhibit orthogonal tags combined with mutually-exclusive tags. An example orthogonal tag is small_motion that is always found in combination with run or other tags that are mutually exclusive with run.
  • on exporting such already-tagged data to json, it makes sense to preserve the multiple tags, including in cases "Multiple tags per time step" is not checked.
  • we may not simply force all future tags to be mutually exclusive. The head-tail inversion marker would be orthogonal, for example, unless we leave the user with the task of defining combined tags such as inverted run, inverted bend, etc in addition to run, bend, etc.

Proposal: Make drag-and-drop tag assignment more destructive, overwrite existing tags in all cases, including with checked "Multiple tags per time step".