Skip to content

Commit f357845

Browse files
committed
* need second output argument to avoid 'Directory already exists.' messages
* drag-and-drop causes "Conversion to matlab.ui.control.UIControl from javahandle_withcallbacks.MLDropTarget" error in "setdiff(UD.Options.Handles,gcbo)" ... check class to avoid conversion attempt * stats renamed to stationNames for clarity.
1 parent dbb7d28 commit f357845

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/tools_lgpl/matlab/quickplot/progsrc/private/qp_basedir.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@
139139
else % Unix
140140
dd = fullfile(getenv('HOME'), '.Deltares', '');
141141
end
142-
if ~mkdir(dd)
142+
[success,~]=mkdir(dd); % need second output argument to avoid 'Directory already exists.' messages
143+
if ~success
143144
dd='';
144145
end
145146

src/tools_lgpl/matlab/quickplot/progsrc/private/qp_interface_update_options.m

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
set(findobj(mfig,'tag','loaddata'),'enable',onoff(EnableLoad))
5757

5858

59-
function [DomainNr,Props,subf,selected,stats,vslice,hslice]=get_basics(MW)
59+
function [DomainNr,Props,subf,selected,stationNames,vslice,hslice]=get_basics(MW)
6060
T_=1; ST_=2; M_=3; N_=4; K_=5;
6161

6262
[DomainNr,Props,subf] = qpfield;
6363
selected = [];
64-
stats =[];
64+
stationNames = [];
6565
vslice=0;
6666
hslice=0;
6767
if isempty(Props)
@@ -78,15 +78,15 @@
7878
end
7979
end
8080
if DimFlag(ST_)
81-
stats=get(MW.StList,'userdata');
82-
alls=get(MW.AllS,'value');
81+
stationNames = get(MW.StList,'userdata');
82+
alls = get(MW.AllS,'value');
8383
if alls
84-
selected{ST_}=0;
84+
selected{ST_} = 0;
8585
else
86-
selected{ST_}=get(MW.EditS,'userdata');
86+
selected{ST_} = get(MW.EditS,'userdata');
8787
end
8888
else
89-
stats={};
89+
stationNames = {};
9090
end
9191

9292
if all(~DimFlag([M_ N_ K_]))
@@ -539,7 +539,11 @@
539539
Inactive=UD.Inactive;
540540
Active=UD.Active;
541541

542-
set(setdiff(UD.Options.Handles,gcbo),'enable','off','backgroundcolor',Inactive)
542+
handles = UD.Options.Handles;
543+
if ishghandle(gcbo)
544+
handles = setdiff(handles,gcbo);
545+
end
546+
set(handles,'enable','off','backgroundcolor',Inactive)
543547

544548
h_axtype=findobj(OH,'tag','axestype=?');
545549
if length(axestype)>1

0 commit comments

Comments
 (0)