Skip to content

Commit

Permalink
Toggle single channel mode in LFP viewer no longer reactivates all ch…
Browse files Browse the repository at this point in the history
…annels
  • Loading branch information
aacuevas committed Feb 12, 2015
1 parent a9dd552 commit 2b1e129
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
18 changes: 13 additions & 5 deletions Builds/VisualStudio2012/open-ephys.sln
@@ -1,21 +1,29 @@
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{5A05F353-1D63-394C-DFB0-981BB2309002}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
Debug|x64 = Debug|x64
Debug64|Win32 = Debug64|Win32
Debug64|x64 = Debug64|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release64|Win32 = Release64|Win32
Release64|x64 = Release64|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.ActiveCfg = Debug|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.Build.0 = Debug|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.ActiveCfg = Release|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.Build.0 = Release|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|x64.ActiveCfg = Debug|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|Win32.ActiveCfg = Debug64|x64
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.ActiveCfg = Debug64|x64
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.Build.0 = Debug64|x64
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.ActiveCfg = Release|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.Build.0 = Release|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|x64.ActiveCfg = Release|Win32
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|Win32.ActiveCfg = Release64|x64
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.ActiveCfg = Release64|x64
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.Build.0 = Release64|x64
EndGlobalSection
Expand Down
6 changes: 5 additions & 1 deletion Source/Processors/LfpDisplayNode/LfpDisplayCanvas.cpp
Expand Up @@ -1223,6 +1223,8 @@ void LfpDisplay::setNumChannels(int numChannels)

channelInfo.add(lfpInfo);

savedChannelState.add(true);

totalHeight += lfpChan->getChannelHeight();

}
Expand Down Expand Up @@ -1374,7 +1376,7 @@ void LfpDisplay::setChannelHeight(int r, bool resetSingle)
singleChan = -1;
for (int n = 0; n < numChans; n++)
{
channelInfo[n]->setEnabledState(true);
channelInfo[n]->setEnabledState(savedChannelState[n]);
}
}

Expand Down Expand Up @@ -1495,12 +1497,14 @@ void LfpDisplay::toggleSingleChannel(int chan)
{
singleChan = chan;
int newHeight = viewport->getHeight();
channelInfo[chan]->setEnabledState(true);
setChannelHeight(newHeight, false);
setSize(getWidth(), numChans*getChannelHeight());
viewport->setScrollBarsShown(false,false);
viewport->setViewPosition(Point<int>(0,chan*newHeight));
for (int n = 0; n < numChans; n++)
{
savedChannelState.set(n, channels[n]->getEnabledState());
if (n != chan) channelInfo[n]->setEnabledState(false);
}

Expand Down
1 change: 1 addition & 0 deletions Source/Processors/LfpDisplayNode/LfpDisplayCanvas.h
Expand Up @@ -264,6 +264,7 @@ class LfpDisplay : public Component
private:
void toggleSingleChannel(int chan);
int singleChan;
Array<bool> savedChannelState;

int numChans;

Expand Down

0 comments on commit 2b1e129

Please sign in to comment.