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.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "SampleTrack.h"
|
||||
|
||||
#include <QDropEvent>
|
||||
#include <QFileInfo>
|
||||
#include <QMenu>
|
||||
#include <QLayout>
|
||||
#include <QMdiArea>
|
||||
@@ -502,6 +503,10 @@ void SampleTCOView::paintEvent( QPaintEvent * pe )
|
||||
qMax( static_cast<int>( 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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user