Richard Bown wrote: > And can someone (either you or Chris) _please_ spend five mins on > answering my observer question from earlier today?
I'm not sure I understood the question, particularly when it got into RosegardenCanvasViews and the like. The way we handle refreshes is pretty confused at the moment, and I don't quite know the best way to set about it -- as you can see from the rather experimental mess in chordnameruler.cpp. I think in principle the right way to do it is probably _not_ to use observers, because they would cause updates to happen as soon as something changes, which is not what you want. I think generally we use the refresh-status API found in Composition and Segment: keep a refresh-status ID in the class that's interested in the refresh, and then from its paintEvent test whether a refresh is needed and redraw if necessary (for Segments you can redraw part of something this way rather than just the whole thing). But for the chord-name ruler I have segment observers as well, because, well, I was interested in both segment and composition changes and I didn't want to risk trying to look up refresh status on segments that had been deleted or whatever. It's an untidy approach though -- one of those "just get the damn thing working so I can worry about the details later" things. Refresh on single segments is much simpler. Chris ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ Rosegarden-devel mailing list [EMAIL PROTECTED] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
