From 716146848c6d6b220d59100ea77a8cc16e6677c3 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 6 Jan 2013 22:48:41 +0100 Subject: [PATCH] ZynAddSubFx: when loading a preset set preset name as track name Based upon the suggestion of Tres Finocchiaro we use the filename of a ZASF preset for determining the preset name and set it as track name. --- plugins/zynaddsubfx/ZynAddSubFx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 78733faed..f1483c19b 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -301,6 +301,9 @@ void ZynAddSubFxInstrument::loadFile( const QString & _file ) m_pluginMutex.unlock(); } + instrumentTrack()->setName( QFileInfo( _file ).baseName(). + replace( QRegExp( "^[0-9]{4}-" ), QString() ) ); + m_modifiedControllers.clear(); emit settingsChanged();