void NLPlayRangeWidget::updateRangeFromSynthesizer(){ // Block signals here so that changing control // values don't rebound and set the synthesizer. blockSignals(true); int firstFrame = _synthesizer->firstFrame(); int lastFrame = _synthesizer->lastFrame(); if(lastFrame < firstFrame){ std::cerr<<"WARNING! NLPlayRangeWidget.cpp: first frame exceeds last frame.\n"; std::cerr<<"Setting last frame = first frame.\n"; lastFrame = firstFrame; } setLower(firstFrame); setUpper(lastFrame); if (firstFrame != _startFrameBox->value()){ if (firstFrame >= _lower){ _startFrameBox->setValue(firstFrame); } } if (lastFrame != _endFrameBox->value()){ if (lastFrame <= _upper){ _endFrameBox->setValue(lastFrame); } } _curFrameBox->setValue(_synthesizer->getCurrentPreviewFrame()); blockSignals(false); }
static void onRsnSetInfo( HWND hwnd, const RS_INFO *pInfo ) { setLower ( hwnd, pInfo->_lower ); setUpper ( hwnd, pInfo->_upper ); setSaveStart2 ( hwnd, pInfo->_lower ); setSaveEnd2 ( hwnd, pInfo->_upper ); setStart ( hwnd, pInfo->_start ); setEnd ( hwnd, pInfo->_end ); setMinRange ( hwnd, pInfo->_minRange ); setGranularity( hwnd, pInfo->_granularity ); invalidateRect( hwnd ); invalidateCursor(); }