Skip to content

Commit

Permalink
Update processor parameter editor views when updating nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Oct 5, 2023
1 parent 5e15ba7 commit 677b27e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/UI/GraphViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ void ProcessorParameterComponent::paint(Graphics& g)
g.fillRect(1, 0, getWidth() - 2, getHeight() - 1);
}

void ProcessorParameterComponent::updateView()
{
for (auto editor : parameterEditors)
{
editor->updateView();
}
}


DataStreamButton::DataStreamButton(GenericEditor* editor_, const DataStream* stream_, DataStreamInfo* info_)
: Button(stream_->getName())
Expand Down Expand Up @@ -784,6 +792,9 @@ void GraphNode::updateStreamInfo()
dataStreamInfos.clear();
dataStreamButtons.clear();

processorParamComponent->updateView();
processorInfoVisible = false;

infoPanel->addPanel(-1, processorParamComponent.get(), false);
infoPanel->setMaximumPanelSize(processorParamComponent.get(),
processorParamComponent->heightInPixels);
Expand Down
3 changes: 3 additions & 0 deletions Source/UI/GraphViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class ProcessorParameterComponent : public Component
/** Paint component */
void paint(Graphics& g);

/** Called when the node needs to update the view of its parameter editors.*/
void updateView();

int heightInPixels;

private:
Expand Down

0 comments on commit 677b27e

Please sign in to comment.