Commit f82ef896 authored by jayd1860's avatar jayd1860
Browse files

v1.48.3

-- Fix some child gui repositioning issues when MainGUI is upodated especially ProcStreamOptionsGUI
-- Don't redisplay ProcStreamOptionsGUI if function call list is exactly same as last time.
parent 9452143f
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ Initialize(handles);
ParseArgs(varargin);

procStreamOptions.err=0;
procStreamOptions.psPrev = ProcStreamClass();

if ~isempty(maingui)
    procStreamOptions.updateParentGui = maingui.Update;
@@ -252,9 +253,14 @@ global procStreamOptions
DEBUG = 0;
hObject = handles.figure;

ps = procStreamOptions.dataTree.currElem.procStream;
if ps.isequal(procStreamOptions.psPrev)
    return
end
procStreamOptions.psPrev.CopyFcalls(ps);

ResetDisplay(handles);

ps = procStreamOptions.dataTree.currElem.procStream;
fcalls = ps.fcalls;
nFcalls = length(fcalls);
if nFcalls==0
@@ -325,8 +331,12 @@ for k = 1:nFcalls
    
    % Draw function call divider for clarity
    p(end+1,:) = [0, Ypfk+b/2, Xst, .3]; %#ok<*AGROW>
    h(end+1,:) = uicontrol(hObject, 'style','pushbutton', 'units','characters', 'position',p(end,:),...
                                    'enable','off');
    h(end+1,:) = uicontrol(hObject, 'style','pushbutton', 'units','characters', 'position',p(end,:), 'enable','off');
    if DEBUG
        fprintf('    %d) Divider:   p = [%0.1f, %0.1f, %0.1f, %0.1f]\n', k, p(1), p(2), p(3), p(4));
    end
    
    
    % Draw function call
    p(end+1,:) = [a, Ypfk, Xsf, Ys];
    if numUsages(k)>1
@@ -363,6 +373,7 @@ for k = 1:nFcalls
                                        'horizontalalignment','center', ...
                                        'Callback',fcn);
    end
    
end

% Set all GUI objects except figure to normalized units, so it can be
@@ -375,6 +386,9 @@ set(h, 'units','normalized');
setGuiFonts(hObject);
rePositionGuiWithinScreen(hObject);

p = get(hObject, 'position');
fprintf('ProcStreamOptionsGUI  size: [%0.2f, %0.2f]\n', p(3), p(4));

figure(handles.figure);
set(handles.pushbuttonExit, 'units','normalized');

+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ if p(4)>=ScreenHeight
    b(4) = p(4) - ScreenHeight;
end
p = p - b;
if p(4)==1
    p(2)=0;
end

% Set the screen units back to initial units
set(0,'units',us0);
+8 −1
Original line number Diff line number Diff line
@@ -12,7 +12,14 @@ p = guiOutsideScreenBorders(hfig);
% then pos correction, then change back to initial units before 
% returning from function
uf0 = get(hfig, 'units');
set(hfig, 'units','normalized', 'position',p);
set(hfig, 'units','normalized');
p0 = get(hfig, 'position');
if p(2)<0
    if p(4)-p(2) >= 1
        p(2) = p0(2);
    end
end
set(hfig, 'position',p);

% Change units back to initial state
set(hfig, 'units', uf0);
+1 −1
Original line number Diff line number Diff line
1.48.2
1.48.3