Disable tempo dial value changes while clicked

This makes it much easier to set a specific tempo since the DSP engine does not set a value while the knob is clicked. The result were jumps while changing tempo which should be resolved now
main
Georg Krause 2019-04-15 15:05:40 +02:00
parent 56ee7c61cc
commit 5fc0a7c000
1 changed files with 4 additions and 1 deletions

View File

@ -272,7 +272,10 @@ GMasterTrack::GMasterTrack(int x, int y, int w, int h, const char* l ) :
void GMasterTrack::setBpm( int b )
{
bpm = b;
tempoDial.value( ( bpm - MIN_TEMPO ) / (float)(MAX_TEMPO - MIN_TEMPO) );
if(!tempoDial.mouseClicked) {
tempoDial.value(
(bpm - MIN_TEMPO) / (float)(MAX_TEMPO - MIN_TEMPO));
}
std::stringstream s;
s << bpm;
tempoDial.copy_label( s.str().c_str() );