Open document with disappearing DocumentViews? - Printable Version +- Hot Door CORE Forum (http://hotdoorcore.com/forum) +-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1) +--- Forum: General discussion (http://hotdoorcore.com/forum/forumdisplay.php?fid=3) +--- Thread: Open document with disappearing DocumentViews? (/showthread.php?tid=257) |
Open document with disappearing DocumentViews? - Rick Johnson - 12-01-2020 I'm working on a plugin with annotations and sometimes need to call currentDocument->currentView()->artworkPointToViewPoint(). Things had been working well, but something weird has started happening. A dialog callback requires annotations and calls it, and it works fine. Then custom art needs to be updated and calls currentDocument->currentView()->artworkPointToViewPoint() after being called by its custom art update message. At that time, currentDocument() is valid and viewCount() returns 1, but currentView() and viewAtIndex(0) both return NULL. So a call to artworkPointToViewPoint now leads to a crash. Can documentView not be called while custom art is updating? If that's OK, what else might I look at for a situation where view functions won't work? |