Skip to content
Snippets Groups Projects
Commit c55c9e57 authored by jsiegle's avatar jsiegle
Browse files

Merge pull request #28 from interpretivechaos/master

Fixes bug with processors without parameterEditors
parents a12568bd b08a0d75
No related branches found
No related tags found
No related merge requests found
......@@ -770,6 +770,12 @@ void TriangleButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDow
}
void GenericEditor::updateParameterButtons(int parameterIndex=-1){
if (parameterEditors.size()==0)
{
//Checks if there is a parameter editor, and stops a bug if there isn't.
std::cout << "No parameterEditors" << std::endl;
}
else{
if (parameterIndex==-1){
for (int i = 0; i < parameterEditors.size(); ++i)
{
......@@ -780,4 +786,5 @@ void GenericEditor::updateParameterButtons(int parameterIndex=-1){
parameterEditors[parameterIndex]->channelSelectionUI();
}
std::cout << "updateParameterButtons" << std::endl;
}
}
......@@ -510,7 +510,6 @@ void ParameterEditor::channelSelectionUI()
{
int numChannels=channelSelector->getNumChannels();
Array<var> possibleValues=parameter->getPossibleValues();
if (parameter->isBoolean())
{
......@@ -522,6 +521,7 @@ void ParameterEditor::channelSelectionUI()
else if (parameter->isDiscrete())
{
std::cout << "Calculating colors for discrete buttons" << std::endl;
Array<var> possibleValues=parameter->getPossibleValues();
for (int i = 0; i < buttonArray.size(); i++)
{
......
......@@ -199,7 +199,6 @@ void SourceNode::enabledState(bool t)
void SourceNode::setParameter(int parameterIndex, float newValue)
{
editor->updateParameterButtons(parameterIndex);
editor->updateParameterButtons(parameterIndex);
//std::cout << "Got parameter change notification";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment