Skip to content

Commit 93a4bd8

Browse files
committed
Merge branch 'dev' of github.com:e0404/matRad into dev
2 parents f78fe37 + 5a73aa6 commit 93a4bd8

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
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

matRad/scenarios/matRad_ScenarioModel.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
function listAllScenarios(this)
9090
matRad_cfg = MatRad_Config.instance();
9191
matRad_cfg.dispInfo('Listing all scenarios...\n');
92-
matRad_cfg.dispInfo('\t#\txShift\tyShift\tzShift\tabsRng\trelRng\tprob.\n');
92+
matRad_cfg.dispInfo('\t#\tctScen\txShift\tyShift\tzShift\tabsRng\trelRng\tprob.\n');
9393
for s = 1:size(this.scenForProb,1)
94-
str = num2str(this.scenForProb(s,:),'\t%.3f');
94+
str = [num2str(this.scenForProb(s,1),'\t%d'),sprintf('\t\t'), num2str(this.scenForProb(s,2:end),'\t%.3f')];
9595
matRad_cfg.dispInfo('\t%d\t%s\t%.3f\n',s,str,this.scenProb(s));
9696
end
9797
end

0 commit comments

Comments
 (0)