Richard Heck wrote:
> >> Fix bug 3939. Don't reset all the parameters when the layout is changed,
> >> but instead: Check if the alignment is permitted; if not, issue a
> >> warning,
> >> and reset to LYX_ALIGN_LAYOUT.
> >
> > I tested the patch and it works. The alignment setting is now
> > preserved over layout changes, as long as the alignment set is
> > valid in the new layout. Very good!
> >
> > A couple of small issues:
> > * Changing the layout to something that doesn't support the
> >   current alignment bothers me with a message box.
> >   (For example, when turning a right-aligned paragraph into "title".)
> >   The message box hampers workflow as one have to click on "ok",
> >   and the message isn't important enough to justify that.
> >   A message printed on the status bar would be much better,
> >   that is what the status bar is there for.  The status bar is nice
> >   in that you don't have to _do_ anything after reading the message,
> >   the status line don't demand useless action.
>
> I'm leaving for vacation in a few minutes. Someone else, hopefully, can
> fix this. Or I can do it when I get back.

I had a look. The problem is that we do not have access to cursor or buffer or 
bufferview from inside applyLayout, which is needed to send the message to 
the status bar.

This could probably be changed by passing one of these as an argument to 
applyLayout, but I'm really not sure this is worth it.

Anyway, Richard's patch could be committed as is, and the message thing can 
still be changed if it turns out to be as annoying as Helge states.

Opinions?

Jürgen

Reply via email to