Hello Brett,

Another thought for the msec spin box is to hook up the editingFinished () 
signal instead of the valueChanged signal.

This appears to to only be called when the spinbox looses focus...

Sincerely,
Julie S.

--- On Sat, 2/5/11, Julie S <[email protected]> wrote:

> From: Julie S <[email protected]>
> Subject: Re: [Rosegarden-devel] Minor bug in TimeWidget
> To: "rosegarden-devel" <[email protected]>, "Brett 
> McCoy" <[email protected]>
> Date: Saturday, February 5, 2011, 1:30 PM
> Hello Brett,
> 
> Concerning the TimeWidget:
> > I'm trying to get my hands dirty on
> > some Rosegarden code and have been
> > looking at a minor issue in the TimeWidget.
> Specifically,
> > the
> > Millisecond spinbox doesn't handle keyboard input
> correctly
> > -- if I
> > type in "451", I get "340" in the text box; if I type
> "650,
> > I get
> > "539". None of the other spinbox widgets have this
> > behavior, and I'm
> > not sure why this one is doing it. The only thing I
> can
> > think of is
> > that it's tied to a realtime calculation and it's
> getting
> > adjusted
> > inaccurately.
> 
> Here is my take on it.
> 
> Whenever we type directly in any of the spin boxes in the
> TimeWidget, each keystroke is triggering a recalculation.
> 
> Try it in the Measure and beat box...you'll see what I
> mean.  Every keystroke triggers a recalculation.
> 
> The problem with this method when it comes to the msec box
> is that, may times we are approaching the granularity limits
> of RG.  So each keystroke is triggering a recalculation
> based on the information in the box just after the
> keystroke.
> 
> That is why you are getting odd numbers as you type.
> 
> The spin box buttons itself are a bit deceptive as well
> since they appear to be adding or subtracting 10 to the
> value in the spin box, then that number is getting
> recalculated to match RG granularity.
> 
> I'm not certain this is actually a good behavior.  I
> guess the question is, will something break in RG (like the
> sequencer) if we have durations or start times that don't
> align with RG's granularity.
> 
> My guess is that it will not.
> 
> Maybe a better solution is to auto recalculate when we
> type, and instead of updating the field we could color the
> background of the box as pink or red, or put an astrik next
> to it that has a tooltip attached explaining that this value
> is not currently falling within RG's granularity.
> 
> The up and down arrows on that widget could be made a bit
> more intelligent to step only to the next valid increment,
> instead of the add ten and see what happens approach.
> 
> ...
> 
> I guess we could just not recalculate in this scenario, and
> just let people they are actually getting 123 msec or 124
> msec (when in reality they are not).
> 
> ...
> 
> I think as long as the Sequencer or nothing else is
> breaking, I think we should just let people type what they
> want in this box and not bother with adjusting it to the
> "real time."
> 
> ...
> 
> I hope this helps.
> 
> Sincerely,
> Julie S.
> 
> 
> 
>       
> 
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to
> access resources
> and provide services. The best practices for maximizing a
> physical server's
> connectivity to a physical network are well understood -
> see how these
> rules translate into the virtual world? 
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Rosegarden-devel mailing list
> [email protected]
> - use the link below to unsubscribe
> https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
> 


      

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to