Skip to content
Snippets Groups Projects
Commit 004747c2 authored by Josh Siegle's avatar Josh Siegle
Browse files

Fix problem with displaying buffer size after loading a new configuration

parent 1843dfc8
Branches
Tags
No related merge requests found
......@@ -58,7 +58,7 @@ AudioProcessorEditor* AudioNode::createEditor()
//audioEditor->setUIComponent(getUIComponent());
//audioEditor->updateBufferSizeText();
//setEditor(editor);
// setEditor(editor);
return audioEditor;
......@@ -76,8 +76,8 @@ void AudioNode::resetConnections()
void AudioNode::updateBufferSize()
{
AudioEditor* editor = (AudioEditor*) getEditor();
editor->updateBufferSizeText();
//AudioEditor* editor = (AudioEditor*) getEditor();
audioEditor->updateBufferSizeText();
}
......
......@@ -104,7 +104,7 @@ private:
/** An array of pointers to the channels that feed into the AudioNode. */
Array<Channel*> channelPointers;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AudioNode);
};
......
......@@ -67,7 +67,7 @@ void AudioWindowButton::paintButton(Graphics& g, bool isMouseOver, bool isButton
if (getToggleState())
g.setColour(Colours::yellow);
else
g.setColour(Colours::black);
g.setColour(Colours::lightgrey);
g.setFont(font);
//g.drawSingleLineText(" AUDIO",0,0);
......@@ -77,6 +77,7 @@ void AudioWindowButton::paintButton(Graphics& g, bool isMouseOver, bool isButton
void AudioWindowButton::setText(String text)
{
textString = text;
repaint();
}
AudioEditor::AudioEditor(AudioNode* owner)
......@@ -130,8 +131,7 @@ bool AudioEditor::keyPressed(const KeyPress& key)
void AudioEditor::updateBufferSizeText()
{
// currently crashing
// audioWindowButton->setText(String(getAudioComponent()->getBufferSize()));
audioWindowButton->setText(String(getAudioComponent()->getBufferSize()));
}
void AudioEditor::buttonClicked(Button* button)
......
......@@ -860,5 +860,7 @@ void ControlPanel::loadStateFromXml(XmlElement* xml)
}
}
getProcessorGraph()->getAudioNode()->updateBufferSize();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment