On Saturday, 29 July 2006 20:25, Stephen Torri wrote:
> On Sat, 2006-07-29 at 20:09 +0200, Pedro Lopez-Cabanillas wrote:
> > I think that there is a bug: the chord diagrams aren't drawn over the
> > notehead you clicked, but one or two beats after it.
>
> How you suggest I get the position of where to play the diagram? At
> present I try to calculate the closest element:
>
>    std::cout << "FretboardInserter::createNewFretboard" << std::endl;
>     Event *clef = 0, *key = 0;
>
>     LinedStaff *s = dynamic_cast<LinedStaff *>(staff);
>
>     NotationElementList::iterator closestElement =
>         s->getClosestElementToCanvasCoords(e->x(), (int)e->y(),
>                                            clef, key, false, -1);
>
>     if (closestElement == staff->getViewElementList()->end())
>     {
>         return;
>     }
>
>     timeT insertionTime = (*closestElement)->event()->getAbsoluteTime(); //
> not getViewAbsoluteTime()
>
>     processDialog( staff, insertionTime );

I think that there is nothing wrong in this code fragment. You are calculating 
the insertionTime correctly, and you can see in the event list editor that 
your fingering events have the right times. The problem must be at the 
rendering  part, I guess.

Regards,
Pedro

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to