[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Flake shape transformations
From:       jaham <jaham () gmx ! net>
Date:       2007-06-20 19:22:49
Message-ID: 200706202122.49974.jaham () gmx ! net
[Download RAW message or body]

On Wednesday 20 June 2007 21:00:23 Thomas Zander wrote:
> On Wednesday 20 June 2007 20:35:15 jaham wrote:
> > I do not see that effect. What i can see here is when transforming a
> > selection of more than one object and pressing undo while they are
> > still selected, the selection does not update. But that has not worked
> > before either. So we need to find a way to get a notification when a
> > command was undone, so we can update the selection.
>
> I suggest making the tool listen to the selection changes and doing the
> required update calls based on that.
> This is very different for each tool, so not something we can make
> generic.  For example the default tool now does a shape->repaint() then
> selects it and then does another repaint of that shape to make sure the
> selection will be properly repainted.
> We can change that so that the first repaint is done (to make sure the
> currently drawn selection is removed) and we can let the tool listen to
> the selection changes so it will redraw the shape after its been
> selected.
> The gain to move that second repaint is that if someone else alters the
> selection we also get notified and can repaint.  For example when undo is
> being pressed.

If you mean by selection changes selecting/deselecting of shapes, than we are 
talking about different problems. What i mean is when undoing a command, e.g. 
a transformation, the selection has to be transformed too if the same shapes 
are still selected. There is currently no command (that i know of) that 
changes the selection when undoing. So listening to selection changes does 
not help here. 
You can see what i mean if you create two or more shapes, select them, 
transform them (e.g. rotate) and then press undo while the shapes are still 
selected. The shapes are transformed back, but the selection border is wrong 
now.
So there has to be a way that a command can send a notification that it was 
undone and the currently selected tool can then take the necessary steps to 
update its selection, whatever that is.

>
> Naturally there is no KoSelection when doing this for a tool like the
> pathShape.  It should fix this problem itself based on the tool-selection
> (in this case points).
> In the text tool I do exactly this, whenever the selection changes the
> tool requests a repaint to paint it properly.
>
> > Hmm thinking
> > further, haven't we had a discussion on a similar problem regarding a
> > selection of path points? Do we have a solution for that?
>
> To summarize; this is something that the path tool should keep track of
> and do properly.
I agree, but as i mentioned above, the tool has to be notified that a command 
was done or undone.

Ciao Jan


_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic