Gets the pointer to the AudacityProject that goes with this track panel.
| 372 | /// Gets the pointer to the AudacityProject that |
| 373 | /// goes with this track panel. |
| 374 | AudacityProject * TrackPanel::GetProject() const |
| 375 | { |
| 376 | auto window = GetParent(); |
| 377 | |
| 378 | while(window != nullptr) |
| 379 | { |
| 380 | if(const auto projectWindow = dynamic_cast<ProjectWindow*>(window)) |
| 381 | return projectWindow->FindProject().get(); |
| 382 | |
| 383 | window = window->GetParent(); |
| 384 | } |
| 385 | return nullptr; |
| 386 | } |
| 387 | |
| 388 | void TrackPanel::OnSize( wxSizeEvent &evt ) |
| 389 | { |
no test coverage detected