Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCR reference in imread mainWindow.m causes error in non-mcr setups #750

Open
BecCowley opened this issue Jul 30, 2021 · 1 comment
Open

Comments

@BecCowley
Copy link
Contributor

Lines 290, 300, 310 in GUI/mainWindow all reference 'mcr' and cause the zoom, pan tools not to appear if mcr is not in use.

[img,map,alpha] = imread(fullfile(matlabroot,'mcr','toolbox','matlab','icons','tool_zoom_in.png'));
[img,map,alpha] = imread(fullfile(matlabroot,'mcr','toolbox','matlab','icons','tool_zoom_out.png'));
[img,map,alpha] = imread(fullfile(matlabroot,'mcr','toolbox','matlab','icons','tool_hand.png'));

I am removing the 'mcr' to enable the function to work, but maybe there is a nice way to get around this in the code.

@BecCowley BecCowley changed the title MCR reference in imread mainWindow.m causes crash in non-mcr setups MCR reference in imread mainWindow.m causes error in non-mcr setups Jul 30, 2021
@hugo-sardi
Copy link

Yes, but removing it breaks the stand-alone app. The correct fix is to check if the toolbox is running in deployed mode (standalone version) or within matlab. It is a very quick fix , one just needs to wrap a path to the pngs around the isdeployed function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants