From 5d9c50a0c550a60d7d949e7ffce4c0cbf39f28fb Mon Sep 17 00:00:00 2001 From: Andy Eck Date: Thu, 19 Jun 2025 11:59:33 -0500 Subject: [PATCH] Temp fix for glass brain plots appearing offscreen on windows --- +nla/+net/+result/NetworkResultPlotParameter.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/+nla/+net/+result/NetworkResultPlotParameter.m b/+nla/+net/+result/NetworkResultPlotParameter.m index c9194a85..16be532f 100644 --- a/+nla/+net/+result/NetworkResultPlotParameter.m +++ b/+nla/+net/+result/NetworkResultPlotParameter.m @@ -114,6 +114,15 @@ function brainFigureButtonCallback(network1, network2) brain_plot.drawBrainPlots() waitbar(0.95); close(wait_popup); + + if ispc + %On windows, plots somehow get drawn offscreen. + %We have a function to pin it to the location of the app window that generates it, but + %don't have access to the parent figure in this function. + %So we'll make a mock one with valid position as a temp hack fix for now (ADE 20250619) + mockParentUI = struct('Position', [100 400 100 100]); + nla.gfx.moveFigToParentUILocation(gcf, mockParentUI); + end end % Return a struct. It's either this or a long array. Since matlab doesn't do dictionaries, we're doing this