...

> 4. An old saved document with the fourth root of 81
>    now loaded as the 81th root of four. Saving and 
>    reloading also swaps the n-root components.     (Quite bad!)

...

> 6. The third root special now sticks the "3" under
>    the root sign.                                      (Wrong)

...
 
> The "write" part in math_rootinset.C was changed, and we need
> a corresponding change wherever the "read" takes place. 

I just realized that a *very* simple fix to this would be to just
actively swap cells 1 and 0 in the inset's constructor. Then we don't
even have to know where the thing is being read in. Remember, every root
that you see on-screen was constructed precisely once.

C++ requires a dirty mind ;-)

As for (6), I am confident we can get that to work. Just look at
frontends/controllers/ControlMath.C:

     64 void ControlMath::dispatchCubeRoot() const
     65 {
     66         dispatchFunc(LFUN_INSERT_MATH, "\\root");
     67         dispatchFunc(LFUN_SELFINSERT, "3");
     68         dispatchFunc(LFUN_RIGHT);
     69 }

I expact swapping lines 67 and 68 and appending an LFUN_LEFT will do the
job.

- Martin

Attachment: pgpGiIOYiC76K.pgp
Description: PGP signature

Reply via email to