Skip to content

Commit

Permalink
Update display file name when loading Patman
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Sep 15, 2023
1 parent 3a0e68c commit 21d5c13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/Patman/Patman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ namespace gui

PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
InstrumentViewFixedSize( _instrument, _parent ),
m_pi( nullptr )
m_pi(dynamic_cast<PatmanInstrument*>(_instrument))
{
setAutoFillBackground( true );
QPalette pal;
Expand Down Expand Up @@ -490,6 +490,8 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
m_displayFilename = tr( "No file selected" );

setAcceptDrops( true );
updateFilename();
connect(m_pi, &PatmanInstrument::fileChanged, this, &PatmanView::updateFilename);
}


Expand Down Expand Up @@ -636,8 +638,6 @@ void PatmanView::modelChanged()
m_pi = castModel<PatmanInstrument>();
m_loopButton->setModel( &m_pi->m_loopedModel );
m_tuneButton->setModel( &m_pi->m_tunedModel );
connect( m_pi, SIGNAL( fileChanged() ),
this, SLOT( updateFilename() ) );
}


Expand Down

0 comments on commit 21d5c13

Please sign in to comment.