Skip to content

Commit 38175d9

Browse files
committed
Fix old buffers displaying in Lfp Viewer
1 parent 8a2fa96 commit 38175d9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayNode.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ void LfpDisplayNode::setSubprocessor(int sp)
146146

147147
subprocessorToDraw = sp;
148148
std::cout << "LfpDisplayNode setting subprocessor to " << sp << std::endl;
149+
149150
updateSubprocessorsFlag = false;
150151

151152
}
@@ -171,6 +172,10 @@ bool LfpDisplayNode::resizeBuffer()
171172
{
172173
abstractFifo.setTotalSize(nSamples);
173174
displayBuffer->setSize(nInputs + numEventChannels, nSamples); // add extra channels for TTLs
175+
displayBuffer->clear();
176+
177+
displayBufferIndex.clear();
178+
displayBufferIndex.insertMultiple(0, 0, numChannelsInSubprocessor + numEventChannels);
174179

175180
return true;
176181
}

0 commit comments

Comments
 (0)