Skip to content

Commit a6d3af2

Browse files
committed
fix: check there is data before enabling auto-compression event in mag.imap.view.Field
1 parent 2821af1 commit a6d3af2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

resources/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- (All) Add shortcut to open app from toolbar (quick access)
44
- (All) Fix errors when closing app during mission selection
55

6+
## Software
7+
8+
- (IMAP) Check there is data before enabling auto-compression event in `mag.imap.view.Field`
9+
610
## Package
711

812
- Add MATLAB package definition

src/mission/imap/+mag/+imap/+view/Field.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ function visualize(this)
9393

9494
selectedEvents = this.Events;
9595

96-
if isempty(selectedEvents) && (any(diff(primary.Compression) ~= 0) || any(diff(secondary.Compression) ~= 0))
96+
if isempty(selectedEvents) && ...
97+
((primary.HasData && any(diff(primary.Compression) ~= 0)) || ...
98+
(secondary.HasData && any(diff(secondary.Compression) ~= 0)))
99+
97100
selectedEvents = "Compression";
98101
end
99102

0 commit comments

Comments
 (0)