On Wednesday 25 July 2007 13:45, M. Donalies wrote:
> 1) Why is HEIGHT_ON_STAFF defined both in BaseProperties.cpp and in
> NotationProperties.cpp? What does it mean that it's defined in both
> places?

It's almost certainly a mistake.  I don't recall the history of its 
whereabouts.  It's interesting that the comment in BaseProperties.cpp 
says it "used to" be in NotationProperties, implying that the 
BaseProperties version is the newer, because it isn't actually declared 
in the BaseProperties header, and so only the NotationProperties 
version can actually be in use by other code.  I think removing the 
BaseProperties definition would be fine.

It doesn't make any difference how many times or under what names a 
property is declared; if it has the same string value for its name each 
time, it is the same property.

> 2) HEIGHT_ON_STAFF is the same for all views. What would be the
> consequences of making it local to a view?

In principle, it would reduce the amount of data that could be cached 
between construction of similar views of the same notes, and thus 
increase the overhead in doing layout the second and subsequent times 
if nothing had changed.  In practice, the extra relayout is probably 
done anyway and the saving would be negligible.

> 3) What is required to make a property local to a view? Just adding
> it to the list in NotationProperties ctor?

Yes.  It just has to have a property name that is different in each 
place that wants to refer to it, and NotationProperties creates a 
distinct name for use in each view that contains the property.


Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to