Skip to content

Commit 5a73aa6

Browse files
committed
Update to positioning of the Quality Indicator Table
1 parent 87faa5e commit 5a73aa6

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

matRad/planAnalysis/matRad_showQualityIndicators.m

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function matRad_showQualityIndicators(figHandle,qi)
5757
end
5858
hF = ancestor(figHandle,'figure');
5959
else
60-
pos = get(figHandle,'position');
60+
pos = [0 0 1 1];
6161
hF = figHandle;
6262
end
6363

@@ -86,7 +86,34 @@ function matRad_showQualityIndicators(figHandle,qi)
8686
'position',pos, ...
8787
'ForegroundColor',matRad_cfg.gui.textColor,...
8888
'BackgroundColor',colorMatrix,...
89-
'RowStriping','on');
89+
'RowStriping','on');
90+
91+
%Try to adapt the position of the table
92+
try
93+
ext = get(table,'Extent');
94+
95+
pixPosTableBefore = getpixelposition(table);
96+
97+
relScrollSize = 16./pixPosTableBefore([3 4]);
98+
99+
posOld = pos;
100+
101+
if ext(3) < pos(3)
102+
pos(3) = ext(3) + relScrollSize(1);
103+
pos(1) = posOld(3) - pos(3);
104+
end
105+
106+
if ext(4) < pos(4)
107+
pos(4) = ext(4) + relScrollSize(2);
108+
pos(2) = posOld(4) - pos(4);
109+
end
110+
111+
set(table,'Position',pos);
112+
113+
114+
115+
catch
116+
end
90117
catch ME
91118
matRad_cfg.dispWarning('The uitable function is not implemented in %s v%s.',env,vStr);
92119
end

0 commit comments

Comments
 (0)