Problem with loading a fig file containing IMROI's (and ancestor handles?)
1 次查看(过去 30 天)
显示 更早的评论
Hello Everyone,
I created a GUI that which saves its setting by saving as a .fig file (hgsave or savefig). However Im noticing a weird error where if the figure in the GUI contains any IMROI objects (such as imellipse) then after reloading the figure (hgload or loadfig) then I can no longer use any Imroi functions in that figure (I cant create/delete imroi objects or use their functions). The error that I get is 'Error using hittest Invalid object handle'. I have done some digging around and found that there is a crucial line in ellipseSymbol: h_fig = iptancestor(h_axes,'figure'); Where (Im guessing)it gets an invalid handle of the 'original' figure that created it (before reloading). If I change this line to h_fig = gcf; then it works just fine.
I cannot find any documentation on this iptancestor property and therefore am at a loss how to fix this.
Can anybody help me along with this? Is there maybe a way to 'reset' this ancestor property? Any help is appreciated
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!