Re: UI-update
Otfried Cheong <[email protected]>
| Newsgroups | gmane.comp.graphics.ipe.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/25/2011 11:54 PM, Troels Sørensen wrote: > I am currently writing a few ipelets in lua to manipulate layers and > view, but I have encountered the following problem: after removing some > views and layers, I cannot get the UI to update sensibly. That's because what you are doing is completely illegal. You must NEVER modify the document directly inside an ipelet, as this completely messes up the undo system. What you need to do instead is to build an undo item t and register it using model:register(t). That will also take care of updating the UI. Have a look at the existing ipelets to see how this should work. And of course read http://ipe7.sourceforge.net/manual/lua-ipelets.html Cheers, Otfried