From: Ian Gardner <ilgardner@ya...> - 2011-02-05 00:28:42
----- Original Message -----
> From:D. Michael McIntyre <michael.mcintyre@...>
> For un-linking a segment... Well, why not just double click on the linked
> segment to turn them into independent copies? That already works on repeat
> segments, and the behavior has been around for ages. The one seems to flow
> naturally into the other.
Ok, sounds good.
> Perhaps use a different fill pattern, or play with opacity instead,
> depending on how expensive these drawing operations turn out to be.
> I used a fill pattern variation in the matrix to show tied notes, and that
> seemed to work out reasonably well, although I'm not generally fond of using
> fill patterns.
Thanks for the tip, I'll look into it. Sounds like it should work.
> > I found it hard to implement the idea of prompting for "copy as copy
> > link?" on mouse up when dropping the copied segment, because the
> > which either copies or links is already done at the start of the drag
> > command.
> You've said this before, but I don't understand how this could be so. I
> on a little expedition through the code just now, and I still don't see it.
> I don't doubt you, but I need a guided tour to see what's going on here,
> so I
> can figure out where we are, and how to get there from here.
Unless I'm misunderstanding it myself, it's in SegmentSelector::handleMouseMove(). First time through the function, m_segmentQuickCopyDone is false, so the code which does either the copy or the link-copy is done, then m_segmentQuickCopyDone is set to true. Subsequent calls to SegmentSelector::handleMouseMove() therefore skip over the copy/link-copy section and just process the move.
On mouse up the segment reconfigure command (which is presumably handling the "segment move" we see on the canvas) is added to the stack. If you Ctrl-Z after a quick copy command you have to do it twice, once to undo the move and again to undo the copy. In order to prompt on mouse release and do a link instead of a copy, we'd have to rewind the undo stack, do a link instead of the copy and redo the segment reconfigure to process the equivalent move.
That's the way the code reads to me anyway.
From: D. Michael McIntyre <michael.mcintyre@ro...> - 2011-02-05 02:50:19
On Friday, February 04, 2011, Ian Gardner wrote:
> Unless I'm misunderstanding it myself, it's in
Yeah, there it is. I was looking at handleMouseMove() in the wrong tool.
I see exactly what you're talking about now.
The more I think on it, the more I understand why it works that way too. We
do the copy early so there's something to drag around and interact with.
Well, that's a real pain isn't it? I can think of ways around this, but
nothing that's simple and to the point. Futzing with the undo stack behind
the scenes probably is the most direct approach, but that seems like such an
invitation to have things start blowing up.
D. Michael McIntyre