void SeqSongIndexMatrixView::TrackChangeReceived(BMessage* msg)
{
	// READ SONG BLOCK
	#ifdef AM_TRACE_LOCKS
	printf("SeqSongIndexMatrixView::TrackChangeReceived() read lock\n"); fflush(stdout);
	#endif
	const AmSong*	song = mSongRef.ReadLock();
	if (song) FillMetrics(song);
	mSongRef.ReadUnlock(song);
	// END READ SONG BLOCK

	int32		position;
	if (lowest_position(*msg, &position) != B_OK) return;

	float		top = 0;
	if (uint32(position) < mMetrics.size() ) top = mMetrics[position].mFrame.top;
	BRect		b = Bounds();
	Invalidate( BRect(b.left, top, b.right, b.bottom) );
}
Example #2
0
void SeqPhraseMatrixView::TrackChangeReceived(BMessage* msg)
{
    // READ SONG BLOCK
#ifdef AM_TRACE_LOCKS
    printf("SeqPhraseMatrixView::TrackChangeReceived() read lock\n");
    fflush(stdout);
#endif
    const AmSong*	song = mSongRef.ReadLock();
    if (song) FillTrackMetrics(song);
    mSongRef.ReadUnlock(song);
    // END READ SONG BLOCK

    int32		position;
    if (lowest_position(*msg, &position) != B_OK) return;

    float		top = TrackTop( (uint32)position);
    BRect		b = Bounds();
    Invalidate( BRect(b.left, top, b.right, b.bottom) );

    SetupScrollBars(false, true);
}