X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftimelinepane.C;h=7698cb6936c1f512b07d2d0b0e61484987e0876c;hb=2f28632d8209ef735de1698a596bc94fa9613497;hp=7aae8ebd9426412a94174ca1956c2023cc5b6911;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/timelinepane.C b/cinelerra-5.1/cinelerra/timelinepane.C index 7aae8ebd..7698cb69 100644 --- a/cinelerra-5.1/cinelerra/timelinepane.C +++ b/cinelerra-5.1/cinelerra/timelinepane.C @@ -288,12 +288,12 @@ void TimelinePane::update(int scrollbars, int patchbay) { if(timebar && this->timebar) this->timebar->update(0); - if(patchbay && this->patchbay) this->patchbay->update(); if(scrollbars) { if(samplescroll && this->samplescroll) samplescroll->set_position(); if(trackscroll && this->trackscroll) trackscroll->set_position(); } + if(patchbay && this->patchbay) this->patchbay->update(); if(do_canvas) { @@ -319,8 +319,12 @@ Track *TimelinePane::is_over_patchbay() if( cursor_x < 0 || cursor_x >= w ) return 0; int cursor_y = gui->get_relative_cursor_y() - y; if( cursor_y < 0 || cursor_y >= h ) return 0; + int no = number; + TrackScroll *trackscroll = gui->pane[no]->trackscroll; + if( !trackscroll ) + trackscroll = gui->pane[++no]->trackscroll; // left panes have patchbays, right panes have trackscroll - int pane_y = cursor_y + gui->pane[number+1]->trackscroll->get_position(); + int pane_y = cursor_y + trackscroll->get_position(); for( Track *track=mwindow->edl->tracks->first; track; track=track->next ) { int track_y = track->y_pixel; if( pane_y < track_y ) continue;