Update display file name when opening `PatmanView` (#6870)
* Update display file name when loading Patman * Conditionally update file name
This commit is contained in:
@@ -446,7 +446,7 @@ namespace gui
|
||||
|
||||
PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent ),
|
||||
m_pi( nullptr )
|
||||
m_pi(castModel<PatmanInstrument>())
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
@@ -487,7 +487,15 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
|
||||
"tune_off" ) );
|
||||
m_tuneButton->setToolTip(tr("Tune mode"));
|
||||
|
||||
m_displayFilename = tr( "No file selected" );
|
||||
|
||||
if (m_pi->m_patchFile.isEmpty())
|
||||
{
|
||||
m_displayFilename = tr("No file selected");
|
||||
}
|
||||
else
|
||||
{
|
||||
updateFilename();
|
||||
}
|
||||
|
||||
setAcceptDrops( true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user