diff --git a/Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp b/Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp index 027b704dfcfcdb4b46bc3b89b0ebde900541b6bc..436332444b978252a39b105413b1731e7ec26aab 100644 --- a/Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp +++ b/Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp @@ -848,6 +848,7 @@ void ChannelMappingEditor::mouseUp(const MouseEvent& e) setChannelPosition(i,electrodeButtons[i]->getChannelNum()); } setConfigured(true); + getEditorViewport()->makeEditorVisible(this, false, true); } } diff --git a/Source/Processors/ChannelMappingNode/ChannelMappingNode.cpp b/Source/Processors/ChannelMappingNode/ChannelMappingNode.cpp index 1fa005652daa87683bc7dc13d390a6fe0d3af56d..fd632c8eef455da9859b51b0e2991ef8a3866f46 100644 --- a/Source/Processors/ChannelMappingNode/ChannelMappingNode.cpp +++ b/Source/Processors/ChannelMappingNode/ChannelMappingNode.cpp @@ -68,6 +68,25 @@ void ChannelMappingNode::updateSettings() if (getNumInputs() > 0) channelBuffer.setSize(getNumInputs(), 10000); + previousChannelCount = getNumInputs(); + if (editorIsConfigured) + { + OwnedArray<Channel> tempArray; + channels.swapWith(tempArray); + j=0; + for (int i=0; i < getNumInputs(); i++) + { + int realChan = channelArray[i]; + if (enabledChannelArray[realChan]) + { + channels.add(tempArray[realChan]); + j++; + } + } + tempArray.clear(false); + settings.numOutputs=j; + } + /* if (getNumInputs() != previousChannelCount) { previousChannelCount = getNumInputs(); @@ -103,7 +122,7 @@ void ChannelMappingNode::updateSettings() } } settings.numOutputs=j; - } + }*/ } diff --git a/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.cpp b/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.cpp index 1540782c3cbde6fa85a0cb25e034aa65fda930fd..fef3567156268fe7a9be2ce97d531ae2a6bd9b4c 100755 --- a/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.cpp +++ b/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.cpp @@ -329,6 +329,15 @@ void LfpDisplayCanvas::update() resized(); } + else + { + for (int i = 0; i < processor->getNumInputs(); i++) + { + lfpDisplay->channels[i]->updateType(); + lfpDisplay->channelInfo[i]->updateType(); + } + + } } @@ -1538,6 +1547,12 @@ LfpChannelDisplay::~LfpChannelDisplay() } +void LfpChannelDisplay::updateType() +{ + type = canvas->getChannelType(chan); + typeStr = canvas->getTypeName(type); +} + void LfpChannelDisplay::setEnabledState(bool state) { @@ -1848,6 +1863,13 @@ LfpChannelDisplayInfo::LfpChannelDisplayInfo(LfpDisplayCanvas* canvas_, LfpDispl } +void LfpChannelDisplayInfo::updateType() +{ + type = canvas->getChannelType(chan); + typeStr = canvas->getTypeName(type); + repaint(); +} + void LfpChannelDisplayInfo::buttonClicked(Button* button) { diff --git a/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.h b/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.h index d34bf7fc47f2e93aa559397c9786562770045cf2..caf4e5e51728ab879d457b0ba8fba1e2aebedd04 100755 --- a/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.h +++ b/Source/Processors/LfpDisplayNode/LfpDisplayCanvas.h @@ -314,6 +314,7 @@ public: } channelType getType(); + void updateType(); bool fullredraw; // used to indicate that a full redraw is required. is set false after each full redraw @@ -361,6 +362,7 @@ public: void resized(); void setEnabledState(bool); + void updateType(); private: