From 192201486dbf3d77d7146fa8e3053a74efee349c Mon Sep 17 00:00:00 2001 From: jsiegle <joshs@alleninstitute.org> Date: Mon, 22 Dec 2014 17:36:30 -0800 Subject: [PATCH] Fix deprecated notification booleans --- .../PeriStimulusTimeHistogramEditor.cpp | 14 ++++---- .../Visualization/MatlabLikePlot.cpp | 32 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Source/Processors/Editors/PeriStimulusTimeHistogramEditor.cpp b/Source/Processors/Editors/PeriStimulusTimeHistogramEditor.cpp index dc1461339..2de456adc 100644 --- a/Source/Processors/Editors/PeriStimulusTimeHistogramEditor.cpp +++ b/Source/Processors/Editors/PeriStimulusTimeHistogramEditor.cpp @@ -94,9 +94,9 @@ PeriStimulusTimeHistogramEditor::PeriStimulusTimeHistogramEditor(GenericProcesso hardwareTrialAlignment->addItem("TTL "+String(k+1),k+2); } if (TTLchannelTrialAlignment == -1) - hardwareTrialAlignment->setSelectedId(1, true); + hardwareTrialAlignment->setSelectedId(1, sendNotification); else - hardwareTrialAlignment->setSelectedId(TTLchannelTrialAlignment+2, true); + hardwareTrialAlignment->setSelectedId(TTLchannelTrialAlignment+2, sendNotification); addAndMakeVisible(hardwareTrialAlignment); @@ -440,7 +440,7 @@ PeriStimulusTimeHistogramCanvas::PeriStimulusTimeHistogramCanvas(PeriStimulusTim panButton = new UtilityButton("Pan",Font("Default", 15, Font::plain)); panButton->addListener(this); panButton->setColour(Label::textColourId, Colours::white); - panButton->setToggleState(true,false); + panButton->setToggleState(true, dontSendNotification); addAndMakeVisible(panButton); resetAxesButton = new UtilityButton("Reset Axes",Font("Default", 15, Font::plain)); @@ -477,16 +477,16 @@ void PeriStimulusTimeHistogramCanvas::buttonClicked(Button* button) processor->trialCircularBuffer->clearAll(); } else if (button == zoomButton) { - zoomButton->setToggleState(true,false); - panButton->setToggleState(false,false); + zoomButton->setToggleState(true, dontSendNotification); + panButton->setToggleState(false, dontSendNotification); for (int k=0;k<psthDisplay->psthPlots.size();k++) { psthDisplay->psthPlots[k]->setMode(ZOOM); } } else if (button == panButton) { - zoomButton->setToggleState(false,false); - panButton->setToggleState(true,false); + zoomButton->setToggleState(false, dontSendNotification); + panButton->setToggleState(true, dontSendNotification); for (int k=0;k<psthDisplay->psthPlots.size();k++) { psthDisplay->psthPlots[k]->setMode(PAN); diff --git a/Source/Processors/Visualization/MatlabLikePlot.cpp b/Source/Processors/Visualization/MatlabLikePlot.cpp index ecbd3068f..6af9e71a4 100644 --- a/Source/Processors/Visualization/MatlabLikePlot.cpp +++ b/Source/Processors/Visualization/MatlabLikePlot.cpp @@ -76,11 +76,11 @@ MatlabLikePlot::MatlabLikePlot() activateButton->setVisible(false); - autoRescaleButton->setToggleState(true,true); - panButton->setToggleState(false,false); - dcRemoveButton->setToggleState(false,true); - zoomButton->setToggleState(true,false); - boundsButton->setToggleState(false,true); + autoRescaleButton->setToggleState(true, sendNotification); + panButton->setToggleState(false, dontSendNotification); + dcRemoveButton->setToggleState(false, sendNotification); + zoomButton->setToggleState(true, dontSendNotification); + boundsButton->setToggleState(false, sendNotification); //ScopedPointer<UtilityButton> zoomButton, panButton, verticalShiftButton, , frequencyButton; setRange(xmin,xmax,ymin,ymax,false); @@ -111,10 +111,10 @@ void MatlabLikePlot::setMode(DrawComponentMode mode) { if (mode == DrawComponentMode::ZOOM) { - zoomButton->setToggleState(true,true); + zoomButton->setToggleState(true, sendNotification); } else if (mode == DrawComponentMode::PAN) { - panButton->setToggleState(true,true); + panButton->setToggleState(true, sendNotification); } } @@ -128,7 +128,7 @@ MatlabLikePlot::~MatlabLikePlot() void MatlabLikePlot::setActivateButtonVisiblilty(bool vis, int id) { activateButton->setVisible(vis); - activateButton->setToggleState(id > 0,false); + activateButton->setToggleState(id > 0, dontSendNotification); if (id > 0) activateButton->setLabel(String(id)); else @@ -194,28 +194,28 @@ void MatlabLikePlot::buttonClicked(Button *btn) bool prevState = btn->getToggleState(); if (btn == zoomButton) { - zoomButton->setToggleState(!prevState,false); - panButton->setToggleState(false,false); + zoomButton->setToggleState(!prevState, dontSendNotification); + panButton->setToggleState(false, dontSendNotification); drawComponent->setMode(ZOOM); } else if (btn == autoRescaleButton) { - btn->setToggleState(!prevState,false); + btn->setToggleState(!prevState, dontSendNotification); drawComponent->setAutoRescale(!prevState); } else if (btn == panButton) { - btn->setToggleState(!prevState,false); + btn->setToggleState(!prevState, dontSendNotification); drawComponent->setMode(PAN); - zoomButton->setToggleState(false,false); + zoomButton->setToggleState(false, dontSendNotification); } else if (btn == dcRemoveButton) { - btn->setToggleState(!prevState,false); + btn->setToggleState(!prevState, dontSendNotification); } else if (btn == boundsButton) { - btn->setToggleState(!prevState,false); + btn->setToggleState(!prevState, dontSendNotification); drawComponent->setShowBounds(!prevState); } else if (btn == activateButton) { - btn->setToggleState(!prevState,false); + btn->setToggleState(!prevState, dontSendNotification); if (!prevState) addEvent("StartInterval"); else -- GitLab