Skip to content

Commit

Permalink
Init: only attempt to redraw all stack viewers if a project is open
Browse files Browse the repository at this point in the history
  • Loading branch information
tomka committed Jan 22, 2025
1 parent 9619195 commit d8c9b07
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions django/applications/catmaid/static/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,11 +824,13 @@ var project;
}
})
.finally(() => {
// Finally, make stack layers visible and issue a redraw
project.getStackViewers().forEach(sv => {
sv.getLayers().forEach(l => l.hidden = false);
sv.redraw();
});
if (project) {
// Finally, make stack layers visible and issue a redraw
project.getStackViewers().forEach(sv => {
sv.getLayers().forEach(l => l.hidden = false);
sv.redraw();
});
}
});
}

Expand Down

0 comments on commit d8c9b07

Please sign in to comment.