Skip to content

Commit

Permalink
mlrAdjustGUI.m: from matlab version 9.4 (and possibly before), some u…
Browse files Browse the repository at this point in the history
…imenu property names have changed and need to be replaced
  • Loading branch information
julienbesle committed Feb 4, 2019
1 parent f4420e4 commit 8202538
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mrLoadRet/GUI/mlrAdjustGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,15 @@ function setItemProperty(args,uiControls,menuControls,plotAxes,verbose)

else %if the property is not 'location', then we just set the property using set

if ~verLessThan('matlab','9.4') && strcmp(get(h,'Type'),'uimenu') % some menu property names changed starting at version 9.4 (or possibly before)
switch(propertyName)
case 'callback'
propertyName = 'menuselectedfcn';
case 'label'
propertyName = 'text';
end
end

% check if the property exists
fieldNames = lower(fieldnames(get(h)));

Expand Down

0 comments on commit 8202538

Please sign in to comment.