Explorar o código

interactivity: selectOnly, only deselect for the structure of the given loci

Alexander Rose %!s(int64=5) %!d(string=hai) anos
pai
achega
0328e93518
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/mol-plugin-state/manager/interactivity.ts

+ 2 - 1
src/mol-plugin-state/manager/interactivity.ts

@@ -204,9 +204,10 @@ namespace InteractivityManager {
         }
 
         selectOnly(current: Representation.Loci, applyGranularity = true) {
-            this.deselectAll();
             const normalized = this.normalizedLoci(current, applyGranularity);
             if (StructureElement.Loci.is(normalized.loci)) {
+                // only deselect for the structure of the given loci
+                this.deselect({ loci: Structure.toStructureElementLoci(normalized.loci.structure), repr: normalized.repr }, false);
                 this.sel.modify('set', normalized.loci);
             }
             this.mark(normalized, MarkerAction.Select);