UC-Davis-molecular-computing / scadnano

Web application for designing DNA structures such as DNA origami.
https://scadnano.org
MIT License
21 stars 13 forks source link

select all strands with same... #882

Closed dave-doty closed 10 months ago

dave-doty commented 12 months ago

Implement a feature "Select all with same..." under the Edit menu that selects all Strands (in a separate issue we can handle other objects if users request it) with the same "property" as the currently selected Strand.

For example, if the currently selected strand has label "abc", and if the label field is selected in the dialog, then this would select all Strands with the label "abc". Also include fields color, name, modifications (5p, 3p, internal), dna_sequence, idt, circular.

Two other cases to consider:

  1. If multiple strands are selected, it takes an OR: if two strands are selected with labels "abc" and "def", then afterwards all strands with either label are selected.
  2. If multiple fields are selected, it takes an AND: if a strand is selected with color red and label "abc", then all strands with color red and label "abc" are selected.
  3. I haven't thought through what to do if multiple strands and multiple fields are selected. Hopefully the logic that implements 1 and 2 above will simply do something reasonable here, but if not then just pick something reasonable to do in this case. To be concrete, let's say two strands are selected, one with label "abc" and color red, and the other with label "def" and color blue, and both label and color are checked in the dialog. Then perhaps we should pick all strands that have a label "abc" or "def" and have color red or blue.
dave-doty commented 10 months ago

Release notes

Select all with same...

You can select a strand (or multiple strands) and pick Edit-->Copy/Paste/Select-->Select all with same... and select all strands that have the same "trait" as the currently selected strand.

A common case is to use Strand labels to generate "groups" of strands, where strands with the same label are considered in the same group. Then by selecting a strand with that label, and picking "Select all with same..." label:

image

image

all strands with the label are selected:

image