On Wednesday 20 February 2002 2:45 pm, Jean-Marc Lasgouttes wrote: > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> When the loading status of a graphics file changes, I need to > Angus> inform LyX. I do this with: > > Angus> LyXFunc::dispatch(LFUN_GRAPHICS_CHANGED_STATE, argument); > > Angus> where argument is a list of insets as a space-separated string. > Angus> I split the string up and convert each substring back to a > Angus> pointer with: > > Why can't you signal the insets directly? It looks like a case where > the lyxfunc think is really not appropriate... It looks like you could > just call some InsetGraphics::fileChanged method directly.
Ok. I thought it was ugly. So how should I proceed. Somehow I need to tell the underlying bufferview that the inset has changed. That is, I'll have to call BufferView::updateInset(Inset *, false) The question is how? Should I modify GCache::update from void GCache::update(InsetGraphics const &); to void GCache::update(InsetGraphics const &, BufferView const *); and store which BufferView the inset is to be found in. Only this won't work when we have multiple BufferViews. Alternatively, I should store the BufferView in the inset, but this also seems very ugly. I have _really_ no clue about this and I am rapidly running out of time to fix it. Perhaps I'll just post a copy of what I have and let you play? As far as I can see, this is the only show stopper left for asynchronous graphics conversion. Angus