Browse Source

Don't allow to add in/outs in juce-patchbay

tags/1.9.4
falkTX 10 years ago
parent
commit
f6a4fab7e2
5 changed files with 19 additions and 19 deletions
  1. +17
    -0
      source/modules/native-plugins/juce-host/FilterGraph.cpp
  2. +1
    -0
      source/modules/native-plugins/juce-host/FilterGraph.h
  3. +0
    -6
      source/modules/native-plugins/juce-host/GraphEditorPanel.cpp
  4. +1
    -12
      source/modules/native-plugins/juce-host/MainHostWindow.cpp
  5. +0
    -1
      source/modules/native-plugins/juce-host/MainHostWindow.h

+ 17
- 0
source/modules/native-plugins/juce-host/FilterGraph.cpp View File

@@ -214,6 +214,23 @@ void FilterGraph::clear()
changed();
}
void FilterGraph::clearKeepingInternals()
{
if (panel != nullptr)
panel->closeAllCurrentlyOpenWindows();
graph.clear();
InternalPluginFormat internalFormat;
addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioInputFilter), 0.5f, 0.1f);
addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiInputFilter), 0.25f, 0.1f);
addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::audioOutputFilter), 0.5f, 0.9f);
addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiOutputFilter), 0.25f, 0.9f);
changed();
}
//==============================================================================
String FilterGraph::getDocumentTitle()
{


+ 1
- 0
source/modules/native-plugins/juce-host/FilterGraph.h View File

@@ -81,6 +81,7 @@ public:
uint32 destFilterUID, int destFilterChannel);
void clear();
void clearKeepingInternals();
//==============================================================================


+ 0
- 6
source/modules/native-plugins/juce-host/GraphEditorPanel.cpp View File

@@ -1084,9 +1084,6 @@ GraphDocumentComponent::GraphDocumentComponent (FilterGraph& g)
{
addAndMakeVisible (graphPanel = new GraphEditorPanel (graph));
// listen for audio/midi count change
//deviceManager->addChangeListener (graphPanel);
//keyState.addListener (&graphPlayer.getMidiMessageCollector());
addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (keyState,
@@ -1103,9 +1100,6 @@ GraphDocumentComponent::~GraphDocumentComponent()
{
graph.setPanel(nullptr);
// listen for audio/midi count change
//deviceManager->removeChangeListener (graphPanel);
deleteAllChildren();
//keyState.removeListener (&graphPlayer.getMidiMessageCollector());


+ 1
- 12
source/modules/native-plugins/juce-host/MainHostWindow.cpp View File

@@ -92,9 +92,6 @@ MainHostWindow::MainHostWindow (AudioPluginFormatManager& fm, FilterGraph& graph
setVisible (true);
InternalPluginFormat internalFormat;
internalFormat.getAllTypes (internalTypes);
ScopedPointer<XmlElement> savedPluginList (appProperties.getUserSettings()->getXmlValue ("pluginList"));
if (savedPluginList != nullptr)
@@ -222,7 +219,7 @@ void MainHostWindow::menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/
if (menuItemID == 250)
{
if (graphEditor != nullptr)
graphEditor->graph.clear();
graphEditor->graph.clearKeepingInternals();
}
else if (menuItemID >= 100 && menuItemID < 200)
{
@@ -263,19 +260,11 @@ void MainHostWindow::createPlugin (const PluginDescription* desc, int x, int y)
void MainHostWindow::addPluginsToMenu (PopupMenu& m) const
{
for (int i = 0; i < internalTypes.size(); ++i)
m.addItem (i + 1, internalTypes.getUnchecked(i)->name);
m.addSeparator();
knownPluginList.addToMenu (m, pluginSortMethod);
}
const PluginDescription* MainHostWindow::getChosenType (const int menuID) const
{
if (menuID >= 1 && menuID < 1 + internalTypes.size())
return internalTypes [menuID - 1];
return knownPluginList.getType (knownPluginList.getIndexChosenByMenu (menuID));
}


+ 0
- 1
source/modules/native-plugins/juce-host/MainHostWindow.h View File

@@ -83,7 +83,6 @@ private:
//==============================================================================
AudioPluginFormatManager& formatManager;
OwnedArray <PluginDescription> internalTypes;
KnownPluginList knownPluginList;
KnownPluginList::SortMethod pluginSortMethod;


Loading…
Cancel
Save