Skip to content

Commit 21cc0bc

Browse files
authored
Temp fix for glass brain plots appearing offscreen on windows (#124)
1 parent 0618978 commit 21cc0bc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

+nla/+net/+result/NetworkResultPlotParameter.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ function brainFigureButtonCallback(network1, network2)
114114
brain_plot.drawBrainPlots()
115115
waitbar(0.95);
116116
close(wait_popup);
117+
118+
if ispc
119+
%On windows, plots somehow get drawn offscreen.
120+
%We have a function to pin it to the location of the app window that generates it, but
121+
%don't have access to the parent figure in this function.
122+
%So we'll make a mock one with valid position as a temp hack fix for now (ADE 20250619)
123+
mockParentUI = struct('Position', [100 400 100 100]);
124+
nla.gfx.moveFigToParentUILocation(gcf, mockParentUI);
125+
end
117126
end
118127

119128
% Return a struct. It's either this or a long array. Since matlab doesn't do dictionaries, we're doing this

0 commit comments

Comments
 (0)