So I was investigating this crash on Quantize, and it turns out it 
appeared when the control ruler stuff was committed on the 1st of 
June.  Probably something wrong in the view element or staff code.

Anyway, I took a closer look at the view element, view element list, 
staff and control ruler and I have a few observations:

 -- The control ruler is an observer of the view element list, using a 
new observer mechanism introduced into the view element list for this 
one purpose.  But if the control ruler stored a pointer to a staff, 
instead of a view element list, it could just query the segment from 
that staff and be an observer of the segment instead, and the whole 
new observer mechanism would be unnecessary.  Why not do that?

 -- I see the view element now stores the layout x and layout y 
coordinates that were previously stored in its subclasses.  That 
looks rather dubious to me -- the only reason for it appears to be so 
that the control ruler's items can be placed at those coordinates, 
which is wrong anyway (layout x and layout y are not screen 
coordinates, except by coincidence -- it's probably canvas x and y 
you want).  But in any case why not just position things in the same 
way as every other ruler does it -- by taking the absolute time and a 
ruler scale and asking the ruler scale to calculate x from time?  
Maybe it depends on what the expected behaviour in the notation view 
is -- whether to give the control items the same coordinates as the 
notes (from their canvas x coordinates) or to space them evenly like 
the representation in the raw note ruler (from a simple ruler scale).  
I probably prefer the latter myself.

Anyway, haven't found the actual bug yet.  I'm tempted to go ahead and 
make the above changes anyway just because it'll make the code so 
much simpler for locating this bug, but I should probably wait and 
see if there are good reasons not to.


Chris



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to