[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44670] hgload can't open Matlab figures
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #44670] hgload can't open Matlab figures |
Date: |
Tue, 26 Jul 2016 10:30:31 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 |
Follow-up Comment #7, bug #44670 (project octave):
Thanks Pantxo, I just tried struct2hdl on a .fig file and it did work quite
well. I have a few remarks:
* figure: properties do not seem to be taken into account (Position, Name,
MenuBar, ...).
* uicontrol: if an element does not have a style property, the default is
"pushbutton" (see below).
* uicontrol: for compatibility, a uicontrol frame could be changed into a
uipanel (see below).
* uicontrol: each element is first displayed with default position (bottom
left of the figure) then moved to its final location, which is slow.
Here are the small changes I made to the createui() subfunction:
function [h, s] = createui (s, par)
if (isfield (s.properties, "style") && strcmp (s.properties.style,
"frame"))
s.type = "uipanel";
endif
switch s.type
case "uicontrol"
if (!isfield (s.properties, "style"))
s.properties.style = "pushbutton";
endif
h = uicontrol (par, "style", s.properties.style);
s.properties = rmfield (s.properties, "style");
if (isfield (s.properties, "cdata") && isempty (s.properties.cdata))
s.properties = rmfield (s.properties, "cdata");
endif
case "uipanel"
h = uipanel (par);
case "uibuttongroup"
h = uibuttongroup (par);
otherwise
eval (sprintf ("h = %s (\"parent\", par);", s.type));
endswitch
addmissingprops (h, s.properties);
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44670>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/