| 456 | |
| 457 | |
| 458 | void SampleTCOView::mouseDoubleClickEvent( QMouseEvent * ) |
| 459 | { |
| 460 | QString af = m_tco->m_sampleBuffer->openAudioFile(); |
| 461 | |
| 462 | if ( af.isEmpty() ) {} //Don't do anything if no file is loaded |
| 463 | else if ( af == m_tco->m_sampleBuffer->audioFile() ) |
| 464 | { //Instead of reloading the existing file, just reset the size |
| 465 | int length = (int) ( m_tco->m_sampleBuffer->frames() / Engine::framesPerTick() ); |
| 466 | m_tco->changeLength(length); |
| 467 | } |
| 468 | else |
| 469 | { //Otherwise load the new file as ususal |
| 470 | m_tco->setSampleFile( af ); |
| 471 | Engine::getSong()->setModified(); |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | |
| 476 |
nothing calls this directly
no test coverage detected