On Thu, Apr 06, 2006 at 02:05:23PM +0200, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > >> Also, is there a reason why Wide() and repaintAll() are not members > >> of PainterInfo? This has to be better than those mutable variables, > >> especially since their lifetime is the update() call. I do not like > >> adding state info where it does not belong. > > Martin> Think multiple nested insets. > > What can happen is non-wide inset inside wide inset, right?
Yes, the reverse shouldn't really happen (but sometimes does) > Martin> About repaintAll, the row painter rp is not created yet in > Martin> some places where I need it. Do you see a way around that? > > But you always have a PainterInfo object. True. How would you do it? > Martin> Testing whether a row has already been painted onto the > Martin> screen. Not repainting it if so... but only if we are inside > Martin> an inset that allows this without messing up the display > Martin> ("Wide"). However, always fully repainting the "current row" > Martin> (if it is non-trivial, i.e., contains more than just an inset) > Martin> and any (nested) insets contents on it. > > Thanks. > > One last thing: the following code > > Index: mathed/math_hullinset.h > =================================================================== > --- mathed/math_hullinset.h (revision 13538) > +++ mathed/math_hullinset.h (working copy) > @@ -189,7 +189,7 @@ public: > /// what appears in the minibuffer when opening > virtual std::string const editMessage() const; > /// > - virtual bool isTextInset() const { return true; } > + virtual bool canTrackChanges() const { return true; } > /// > virtual void mutateToText(); > /// > > seems very wrong to me. Isn't it the reason for bug 2214? > http://bugzilla.lyx.org/show_bug.cgi?id=2214 Yes, I'm sure it is. I suppose the idea is rather to add this capability to math. At least for text-in-math, which as we all know is not in good shape. > In other words, shall we remove this method? Math insets cannot do > change tracking. Perhaps with a FIXME, yes. > I am currently committing the fix to bug 2195. Great! - Martin
pgpMQ8Y7X3pys.pgp
Description: PGP signature