Skip to content

Commit

Permalink
Fixing "Ghost" VST appearing after restart fixed #243
Browse files Browse the repository at this point in the history
  • Loading branch information
elieserdejesus committed Jan 21, 2016
1 parent 8527c20 commit cba1a5d
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions Client/src/Standalone/gui/MainWindowStandalone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,6 @@ LocalTrackGroupViewStandalone *MainWindowStandalone::createLocalTrackGroupView(i
return new LocalTrackGroupViewStandalone(channelGroupIndex, this);
}


LocalTrackGroupViewStandalone *MainWindowStandalone::geTrackGroupViewByName(const QString &trackGroupName)
const
{
foreach (LocalTrackGroupViewStandalone *trackGroupView, getLocalChannels<LocalTrackGroupViewStandalone *>()) {
if (trackGroupView->getGroupName() == trackGroupName)
return trackGroupView;
}
return nullptr;
}

QList<Persistence::Plugin> buildPersistentPluginList(QList<const Audio::Plugin *> trackPlugins)
{
QList<Persistence::Plugin> persistentPlugins;
Expand All @@ -241,8 +230,12 @@ LocalInputTrackSettings MainWindowStandalone::getInputsSettings() const

// recreate the settings including the plugins
LocalInputTrackSettings settings;
QList<LocalTrackGroupViewStandalone *> groups = getLocalChannels<LocalTrackGroupViewStandalone *>();
Q_ASSERT(groups.size() == baseSettings.channels.size());

int channelID = 0;
foreach (const Channel &channel, baseSettings.channels) {
LocalTrackGroupViewStandalone *trackGroupView = geTrackGroupViewByName(channel.name);
LocalTrackGroupViewStandalone *trackGroupView = groups.at(channelID++);
if (!trackGroupView)
continue;
Channel newChannel = channel;
Expand Down

0 comments on commit cba1a5d

Please sign in to comment.