Skip to content

Commit

Permalink
Do not show figure until it is fully populated
Browse files Browse the repository at this point in the history
  • Loading branch information
mfacchinelli committed Feb 22, 2024
1 parent 5d9a881 commit b8b1cb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions resources/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `Compression` property to supported events for plotting
- Add `YAxisLocation` for `mag.graphics.style.Default` and `mag.graphics.style.Stackedplot`
- Shift `YAxisLocation` to "right" for plots on right-hand side of some views: `mag.graphics.view.Field`, `mag.graphics.view.Frequency`, `mag.graphics.view.HK`, `mag.graphics.view.IALiRT`, and `mag.graphics.view.RampMode`
- Do not show figure until it is fully populated in `mag.graphics.visualize`
- Create `mag.meta.Mode` enumeration to capture sensor science mode
- Move definition of time constants to shared utility file `mag.time.Constant`
- Make `mag.process.Range` and `mag.process.SignedInteger` more flexible to custom variable names
Expand Down
5 changes: 4 additions & 1 deletion src/visualize/+mag/+graphics/visualize.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
drawnow();

% Create and populate figure.
f = figure(Name = options.Name, NumberTitle = "off", WindowState = options.WindowState, Visible = matlab.lang.OnOffSwitchState(options.Visible));
% Make sure figure is hidden while being populated, and only shown, if
% requested, at the end.
f = figure(Name = options.Name, NumberTitle = "off", WindowState = options.WindowState, Visible = "off");
setVisibility = onCleanup(@() set(f, Visible = matlab.lang.OnOffSwitchState(options.Visible)));

if isequal(options.Arrangement, zeros(1, 2))
arrangement = {"flow"};
Expand Down

0 comments on commit b8b1cb3

Please sign in to comment.