From 379e1020abd3f3cdad5930bfd08e0dc8a81cc6d6 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 21 Jul 2017 18:02:53 +0200 Subject: [PATCH] Sample tracks: Show the file name of the loaded file in the label Show the file name without the full path in the text label for sample tracks. Show the file name with the full path in the tool tip. --- src/tracks/SampleTrack.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index a31a53afd..8ca8a4b90 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -25,6 +25,7 @@ #include "SampleTrack.h" #include +#include #include #include #include @@ -502,6 +503,10 @@ void SampleTCOView::paintEvent( QPaintEvent * pe ) qMax( static_cast( m_tco->sampleLength() * ppt / ticksPerTact ), 1 ), rect().bottom() - 2 * spacing ); m_tco->m_sampleBuffer->visualize( p, r, pe->rect() ); + QFileInfo fileInfo(m_tco->m_sampleBuffer->audioFile()); + QString filename = fileInfo.fileName(); + paintTextLabel(filename, p); + // disable antialiasing for borders, since its not needed p.setRenderHint( QPainter::Antialiasing, false );