From b9c926dabd887c0e90db265e6c3642d72bc4416e Mon Sep 17 00:00:00 2001 From: Mike Choi Date: Thu, 3 Jan 2013 22:09:24 +0100 Subject: [PATCH] VST parametr control window: window title as trackname Window title for VSTi parameter controlling window should be set according to actual track name, not from VST plugin name as its now, it is hard to get to know which window belongs to where when same plugin is e.g. opened several times, so with the same name. Now this is handled in paint event, but TBD whenever is that track name changed. tbd, temporary solution. Signed-off-by: Tobias Doerffel --- plugins/vestige/vestige.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 32e82c252..4a5a3d456 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -852,6 +852,11 @@ void VestigeInstrumentView::paintEvent( QPaintEvent * ) m_vi->m_plugin->vendorString() ); p.drawText( 10, 225, m_vi->m_plugin->currentProgramName() ); } + + if( m_vi->m_subWindow != NULL ) + { + m_vi->m_subWindow->setWindowTitle( m_vi->instrumentTrack()->name() ); + } // m_pluginMutex.unlock(); } @@ -872,7 +877,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); m_vi->m_subWindow->setFixedSize( 960, 300); m_vi->m_subWindow->setWidget(m_vi->m_scrollArea); - m_vi->m_subWindow->setWindowTitle(m_vi->m_plugin->name()); + m_vi->m_subWindow->setWindowTitle( m_vi->instrumentTrack()->name() ); m_vi->m_subWindow->setWindowIcon( PLUGIN_NAME::getIconPixmap( "logo" ) ); //m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose); @@ -1114,6 +1119,7 @@ void manageVestigeInstrumentView::dropEvent( QDropEvent * _de ) void manageVestigeInstrumentView::paintEvent( QPaintEvent * ) { + m_vi->m_subWindow->setWindowTitle(m_vi->instrumentTrack()->name()); }