Skip to content

Commit

Permalink
Remove selected structures on model change. Fixes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 5, 2024
1 parent 8b41af2 commit 8a4053c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ const Header = observer(({ model }: { model: MsaViewModel }) => {
onClick={async () => {
try {
model.setData({ tree: '', msa: '' })
await model.setTreeFilehandle(undefined)
await model.setMSAFilehandle(undefined)
model.clearSelectedStructures()
model.setScrollY(0)
model.setScrollX(0)
model.setCurrentAlignment(0)
await model.setTreeFilehandle(undefined)
await model.setMSAFilehandle(undefined)
} catch (e) {
console.error(e)
model.setError(e)
Expand Down

0 comments on commit 8a4053c

Please sign in to comment.